Two minor changes to writing/gotchas.

This commit is contained in:
george
2014-06-17 12:56:32 -06:00
parent e7f0d1fa8f
commit 93c4d9b49c
+2 -2
View File
@@ -79,7 +79,7 @@ signal that no argument was provided (:py:data:`None` is often a good choice).
When the Gotcha Isn't a Gotcha
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sometimes you specifically can "exploit" (read: use as intended) this behavior
Sometimes you can specifically "exploit" (read: use as intended) this behavior
to maintain state between calls of a function. This is often done when writing
a caching function.
@@ -126,7 +126,7 @@ What Does Happen
8
8
Five functions are created, but all of them just multiply ``x`` by 4.
Five functions are created; instead all of them just multiply ``x`` by 4.
Python's closures are *late binding*.
This means that the values of variables used in closures are looked