Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9deddb

Browse files
committed
comprehrensions now have proper scoping #5106
1 parent 1010bf3 commit e9deddb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/reference/executionmodel.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ definition occurs in a function block, the scope extends to any blocks contained
5151
within the defining one, unless a contained block introduces a different binding
5252
for the name. The scope of names defined in a class block is limited to the
5353
class block; it does not extend to the code blocks of methods -- this includes
54-
generator expressions since they are implemented using a function scope. This
55-
means that the following will fail::
54+
comprehensions and generator expressions since they are implemented using a
55+
function scope. This means that the following will fail::
5656

5757
class A:
5858
a = 42

0 commit comments

Comments
 (0)