summaryrefslogtreecommitdiff
path: root/Doc/reference/executionmodel.rst
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-18 18:40:46 +0000
committerChristian Heimes <christian@cheimes.de>2008-01-18 18:40:46 +0000
commit8444fa9a1f8d817c3eff0e110b7f933b5ea31d66 (patch)
treed5fffb15b7b751bdbef9f22baf1d027486557f82 /Doc/reference/executionmodel.rst
parent000c66637af9e20cbe5e8e456b930a5d6d8d8558 (diff)
downloadcpython-8444fa9a1f8d817c3eff0e110b7f933b5ea31d66.tar.gz
Merged revisions 60043-60052 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r60043 | christian.heimes | 2008-01-18 10:51:43 +0100 (Fri, 18 Jan 2008) | 2 lines Build _ctypes after the other extensions. Its build process depends on the _weakref extension (and maybe other modules, too) ........ r60048 | christian.heimes | 2008-01-18 12:58:50 +0100 (Fri, 18 Jan 2008) | 2 lines Added win_add2path.py to Tools/scripts/ Added builddoc.bat to Doc/ ........ r60049 | vinay.sajip | 2008-01-18 16:54:14 +0100 (Fri, 18 Jan 2008) | 1 line Added section on passing contextual information to logging and documentation for the LoggerAdapter class. ........ r60050 | vinay.sajip | 2008-01-18 16:55:57 +0100 (Fri, 18 Jan 2008) | 1 line Added LoggerAdapter class, changed copyright dates, made check for extra parameter passed to logging methods explicitly against None rather than a truth value. ........ r60051 | georg.brandl | 2008-01-18 17:42:57 +0100 (Fri, 18 Jan 2008) | 2 lines Note that genexps are function scopes too and therefore won't see class attributes. ........ r60052 | christian.heimes | 2008-01-18 19:24:07 +0100 (Fri, 18 Jan 2008) | 1 line Added bytes and b'' as aliases for str and '' ........
Diffstat (limited to 'Doc/reference/executionmodel.rst')
-rw-r--r--Doc/reference/executionmodel.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/reference/executionmodel.rst b/Doc/reference/executionmodel.rst
index 1f85e49d4b..43515d94ef 100644
--- a/Doc/reference/executionmodel.rst
+++ b/Doc/reference/executionmodel.rst
@@ -50,7 +50,13 @@ variable is defined in a block, its scope includes that block. If the
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.
+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::
+
+ class A:
+ a = 42
+ b = list(a + i for i in range(10))
.. index:: single: environment