[Python-checkins] r52885 - peps/trunk/pep-3104.txt

ka-ping.yee python-checkins at python.org
Fri Dec 1 04:32:34 CET 2006


Author: ka-ping.yee
Date: Fri Dec  1 04:32:33 2006
New Revision: 52885

Modified:
   peps/trunk/pep-3104.txt
Log:
Add one more proposal to the list of extant proposals (and a reference
to the relevant message on the Python-3000 mailing list).


Modified: peps/trunk/pep-3104.txt
==============================================================================
--- peps/trunk/pep-3104.txt	(original)
+++ peps/trunk/pep-3104.txt	Fri Dec  1 04:32:33 2006
@@ -168,7 +168,7 @@
 if it would not shadow a name already bound in an outer scope;
 otherwise assignment is interpreted as rebinding of the outer name.
 Ruby's scoping syntax and rules have also been debated at great
-length, and changes seem likely in Ruby 2.0 [25]_.
+length, and changes seem likely in Ruby 2.0 [28]_.
 
 
 Overview of Proposals
@@ -313,12 +313,13 @@
     - ``using x`` [22]_
     - ``borrow x`` [22]_
     - ``reuse x`` [23]_
+    - ``scope f x`` [25]_ (explicitly specify which scope)
 
 The most commonly discussed choices appear to be ``outer``,
 ``global``, and ``nonlocal``.  ``outer`` is already used as both a
 variable name and an attribute name in the standard library.  The
 word ``global`` has a conflicting meaning, because "global variable"
-is generally understood to mean a variable with top-level scope [24]_.
+is generally understood to mean a variable with top-level scope [27]_.
 In C, the keyword ``extern`` means that a name refers to a variable
 in a different compilation unit.  While ``nonlocal`` is a bit long
 and less pleasant-sounding than some of the other options, it does
@@ -361,7 +362,7 @@
     nonlocal x = 3
 
 The above has exactly the same meaning as ``nonlocal x; x = 3``.
-(Guido supports a similar form of the ``global`` statement [26]_.)
+(Guido supports a similar form of the ``global`` statement [24]_.)
 
 On the left side of the shorthand form, only identifiers are allowed,
 not target expressions like ``x[0]``.  Otherwise, all forms of
@@ -384,7 +385,7 @@
 
 This PEP targets Python 3000, as suggested by Guido [19]_.  However,
 others have noted that some options considered in this PEP may be
-small enough changes to be feasible in Python 2.x [27]_, in which
+small enough changes to be feasible in Python 2.x [26]_, in which
 case this PEP could possibly be moved to be a 2.x series PEP.
 
 As a (very rough) measure of the impact of introducing a new keyword,
@@ -500,17 +501,21 @@
 .. [23] Alternatives to 'outer' (Jim Jewett)
    http://mail.python.org/pipermail/python-3000/2006-November/004153.html
 
-.. [24] Global variable (version 2006-11-01T01:23:16)
+.. [24] Draft PEP for outer scopes (Guido van Rossum)
+   http://mail.python.org/pipermail/python-3000/2006-November/004166.html
+
+.. [25] Draft PEP for outer scopes (Talin)
+   http://mail.python.org/pipermail/python-3000/2006-November/004190.html
+
+.. [26] Draft PEP for outer scopes (Nick Coghlan)
+   http://mail.python.org/pipermail/python-3000/2006-November/004237.html
+
+.. [27] Global variable (version 2006-11-01T01:23:16)
    http://en.wikipedia.org/wiki/Global_variable
 
-.. [25] Ruby 2.0 block local variable
+.. [28] Ruby 2.0 block local variable
    http://redhanded.hobix.com/inspect/ruby20BlockLocalVariable.html
 
-.. [26] Draft PEP for outer scopes (Guido van Rossum)
-   http://mail.python.org/pipermail/python-3000/2006-November/004166.html
-
-.. [27] Draft PEP for outer scopes (Nick Coghlan)
-   http://mail.python.org/pipermail/python-3000/2006-November/004237.html
 
 Acknowledgements
 ================


More information about the Python-checkins mailing list