kennethreitz/python-guide — pull request #260 by simon-weber (2013-03-26 18:30:16+00:00)
Title: Fix naming and confusing example in gotchas

Multipliers were named adders in the later examples; this was fixed.

To avoid confusion, I changed the def example on line 145 from a generator to using a list. If people were to run the example using the test code provided, it would actually output the "correct" (0 2 4...) answer, since the functions are run immediately after generation, and before the generation of the next function. However, consuming the entire generator and then running the functions shows the "misleading" (8 8 8) answer, since the value of ``i`` is updated at that point.