]> granicus.if.org Git - python/commitdiff
#5469: add with statement to list of name-binding constructs.
authorGeorg Brandl <georg@python.org>
Sun, 15 Mar 2009 21:53:56 +0000 (21:53 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 15 Mar 2009 21:53:56 +0000 (21:53 +0000)
Doc/reference/executionmodel.rst

index 0d15657d8a3ee29ebf656fb903b7f7c08dc53d4a..05f8b928c426a7c2cdbb757202113193d0b585ad 100644 (file)
@@ -87,9 +87,10 @@ subclass of :exc:`NameError`.
 The following constructs bind names: formal parameters to functions,
 :keyword:`import` statements, class and function definitions (these bind the
 class or function name in the defining block), and targets that are identifiers
-if occurring in an assignment, :keyword:`for` loop header, or in the second
-position of an :keyword:`except` clause header.  The :keyword:`import` statement
-of the form "``from ...import *``" binds all names defined in the imported
+if occurring in an assignment, :keyword:`for` loop header, in the second
+position of an :keyword:`except` clause header or after :keyword:`as` in a
+:keyword:`with` statement.  The :keyword:`import` statement
+of the form ``from ... import *`` binds all names defined in the imported
 module, except those beginning with an underscore.  This form may only be used
 at the module level.