From 93c4d9b49c480b17ca32aa38d9eda68354391d18 Mon Sep 17 00:00:00 2001 From: george Date: Tue, 17 Jun 2014 12:56:32 -0600 Subject: [PATCH] Two minor changes to writing/gotchas. --- docs/writing/gotchas.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/writing/gotchas.rst b/docs/writing/gotchas.rst index 12e1861..5ed5669 100644 --- a/docs/writing/gotchas.rst +++ b/docs/writing/gotchas.rst @@ -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