Loading tutorials
undo() does inside a two-stack history manager. It assumes you know Python classes, the push and pop operations of a stack, and basic list handling. Earlier chapters introduced the two stacks and the idea that each action can apply and revert itself. Here the focus is the 3 min readredo(), the operation that restores an action you just undid. It assumes you know the stack data structure with push and pop, and that you can read a small Python class. It also assumes you have seen the two-stack model from the earlier chapters and the undo() method.3 min readHistory class from the previous chapters. It covers what undo() and redo() should do when their stack is empty.2 min readappend and pop, and slice strings. It also assumes you know the two-stack model: an undo stack and a redo stack.2 min readdo, undo and redo operations, and why a new action clears the redo stack. It also assumes you can read Python classes and know the difference between copying a value and sharing a reference.2 min readHistory class from the earlier chapters. It adds one feature to that class: a limit on how many actions the undo stack keeps.3 min readHistory class with do, undo and redo, and the idea that a command has apply() and revert() methods. You should also be comfortable with Python classes and string slicing.3 min readHistory class built earlier in this tutorial. It covers what each operation costs and how to test the history manager so you can trust it.3 min read