]> granicus.if.org Git - python/commitdiff
comprehrensions now have proper scoping #5106
authorBenjamin Peterson <benjamin@python.org>
Sat, 31 Jan 2009 03:57:19 +0000 (03:57 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sat, 31 Jan 2009 03:57:19 +0000 (03:57 +0000)
Doc/reference/executionmodel.rst

index 6ec88f5340a751aee2d23b70d8f12229e2617066..cc9ee3dd8c336b125d273e3e7c5762431667d00e 100644 (file)
@@ -51,8 +51,8 @@ definition occurs in a function block, the scope extends to any blocks contained
 within the defining one, unless a contained block introduces a different binding
 for the name.  The scope of names defined in a class block is limited to the
 class block; it does not extend to the code blocks of methods -- this includes
-generator expressions since they are implemented using a function scope.  This
-means that the following will fail::
+comprehensions and generator expressions since they are implemented using a
+function scope.  This means that the following will fail::
 
    class A:
        a = 42