faif/python-patterns — pull request #15 by Julian-O (2013-08-13 04:38:28+00:00)
Title: Simplified example

(Caution: UNTESTED!)
The example made little sense.

The Undo stack was used to run the commands, not just undo them. Renamed.

The commands had names, for no reason. They are now added directly to the stack.
The stack was edited (popped) while it was being iterated. The cmd variable was unused. Replaced with simple iterator.

The stack should be undone in reverse order. reversed() added.

The comments had grammatical errors. Corrected.