cpython/Lib
Jeremy Hylton 81e9502df6 Provisional implementation of PEP 3104.
Add nonlocal_stmt to Grammar and Nonlocal node to AST.  They both
parallel the definitions for globals.  The symbol table treats
variables declared as nonlocal just like variables that are free
implicitly.

This change is missing the language spec changes, but makes some
decisions about what the spec should say via the unittests.  The PEP
is silent on a number of decisions, so we should review those before
claiming that nonlocal is complete.

Thomas Wouters made the grammer and ast changes.  Jeremy Hylton added
the symbol table changes and the tests.  Pete Shinners and Neal
Norwitz helped review the code.
2007-02-27 06:50:52 +00:00
..
bsddb Fix test_bsddb3 (along with something bsddb) to work with dict views. 2007-02-22 06:40:59 +00:00
compiler Bytes literal. 2007-02-23 19:56:57 +00:00
ctypes Remove the exceptions builtin module, all the exceptions are already builtin. 2007-02-26 22:22:47 +00:00
curses Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
distutils Merged revisions 53623-53858 via svnmerge from 2007-02-23 15:07:44 +00:00
email Fairly subtle fix for failing tests. 2007-02-09 22:36:02 +00:00
encodings Merged revisions 53623-53858 via svnmerge from 2007-02-23 15:07:44 +00:00
hotshot Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
idlelib Fix merge bug (lost line causing syntax error). 2007-02-25 22:37:36 +00:00
lib-tk Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
logging Merged revisions 53623-53858 via svnmerge from 2007-02-23 15:07:44 +00:00
msilib Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
plat-aix3 Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
plat-aix4 Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
plat-atheos Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
plat-beos5 Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
plat-darwin These were somehow never added to CVS. 2002-12-30 22:14:35 +00:00
plat-freebsd2 Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
plat-freebsd3 Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
plat-freebsd4
plat-freebsd5
plat-freebsd6 Whitespace normalization. 2004-08-20 03:47:14 +00:00
plat-freebsd7 Whitespace normalization. 2005-07-17 23:16:17 +00:00
plat-generic
plat-irix5 Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
plat-irix6 Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
plat-linux2 Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
plat-mac Fix plistlib to work with dict views. 2007-02-21 21:18:18 +00:00
plat-netbsd1 Whitespace normalization, via reindent.py. 2004-07-18 06:16:08 +00:00
plat-next3
plat-os2emx Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
plat-riscos Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
plat-sunos5 Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
plat-unixware7 Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
site-packages
sqlite3 Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
test Provisional implementation of PEP 3104. 2007-02-27 06:50:52 +00:00
wsgiref Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
xml Merged revisions 53623-53858 via svnmerge from 2007-02-23 15:07:44 +00:00
__future__.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
__phello__.foo.py
_LWPCookieJar.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
_MozillaCookieJar.py Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
_strptime.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
_threading_local.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
aifc.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
anydbm.py
asynchat.py Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
asyncore.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
atexit.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
audiodev.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
base64.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
BaseHTTPServer.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
Bastion.py Change all the function attributes from func_* -> __*__. This gets rid 2007-02-25 20:55:47 +00:00
bdb.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
binhex.py Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
bisect.py SF Patch #864863: Bisect C implementation 2004-01-05 10:13:35 +00:00
calendar.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
cgi.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
CGIHTTPServer.py Merged revisions 53538-53622 via svnmerge from 2007-02-05 01:24:16 +00:00
cgitb.py Merge ast-branch to head 2005-10-20 19:59:25 +00:00
chunk.py Patch #1373643: The chunk module can now read chunks larger than 2006-02-18 21:10:56 +00:00
cmd.py Get rid of a bunch more raw_input references 2006-03-17 06:49:51 +00:00
code.py Kill off softspace completely (except in formatter.py which seems to have 2007-02-09 23:20:19 +00:00
codecs.py SF patch 1631942 by Collin Winter: 2007-01-10 16:19:56 +00:00
codeop.py SF patch 1631942 by Collin Winter: 2007-01-10 16:19:56 +00:00
colorsys.py Four months of trunk changes (including a few releases...) 2006-12-13 04:49:30 +00:00
commands.py
compileall.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
ConfigParser.py Remove the ability to slice/index on exceptions per PEP 352. 2007-02-27 00:15:55 +00:00
contextlib.py SF patch 1631942 by Collin Winter: 2007-01-10 16:19:56 +00:00
Cookie.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
cookielib.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
copy.py Remove duplicate refs to int from int/long unification presumably. (There might be more refs like these.) 2007-02-27 03:41:04 +00:00
copy_reg.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
cProfile.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
csv.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
dbhash.py typo 2003-05-05 14:16:41 +00:00
decimal.py Merged revisions 53623-53858 via svnmerge from 2007-02-23 15:07:44 +00:00
difflib.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
dircache.py Patch #707167: Pass dircache exceptions to the caller. Fixes #682813. 2003-09-20 15:52:21 +00:00
dis.py Change all the function attributes from func_* -> __*__. This gets rid 2007-02-25 20:55:47 +00:00
doctest.py Change all the function attributes from func_* -> __*__. This gets rid 2007-02-25 20:55:47 +00:00
DocXMLRPCServer.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
dumbdbm.py Fix dumbdbm and test_dumbdbm to work with dict views. Bug in dumbdbm was from 2007-02-22 05:04:32 +00:00
dummy_thread.py Merged revisions 53538-53622 via svnmerge from 2007-02-05 01:24:16 +00:00
dummy_threading.py Merged revisions 53538-53622 via svnmerge from 2007-02-05 01:24:16 +00:00
filecmp.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
fileinput.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
fnmatch.py SF patch #765238: fix fnmatch.__all__ 2003-07-13 16:06:26 +00:00
formatter.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
fpformat.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
ftplib.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
functools.py Four months of trunk changes (including a few releases...) 2006-12-13 04:49:30 +00:00
genericpath.py Four months of trunk changes (including a few releases...) 2006-12-13 04:49:30 +00:00
getopt.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
getpass.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
gettext.py Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
glob.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
gopherlib.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
gzip.py Merged revisions 53623-53858 via svnmerge from 2007-02-23 15:07:44 +00:00
hashlib.py Four months of trunk changes (including a few releases...) 2006-12-13 04:49:30 +00:00
heapq.py Merged revisions 53623-53858 via svnmerge from 2007-02-23 15:07:44 +00:00
hmac.py Merged revisions 53005-53303 via svnmerge from 2007-01-09 23:18:33 +00:00
htmlentitydefs.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
htmllib.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
HTMLParser.py Reverting previous checkin. This breaks too much of HTMLParser to be applied 2005-09-01 06:25:34 +00:00
httplib.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
ihooks.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
imaplib.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
imghdr.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
imputil.py Merged revisions 53623-53858 via svnmerge from 2007-02-23 15:07:44 +00:00
inspect.py Change all the function attributes from func_* -> __*__. This gets rid 2007-02-25 20:55:47 +00:00
io.py Add some XXX comments for Guido to look at. 2007-02-27 06:26:14 +00:00
keyword.py Patch #1550800: make exec a function. 2006-09-06 06:51:57 +00:00
linecache.py Fix another loop over a dict that may change... :-( 2007-02-26 22:21:25 +00:00
locale.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
macpath.py Four months of trunk changes (including a few releases...) 2006-12-13 04:49:30 +00:00
macurl2path.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
mailbox.py Fix another unit test. 2007-02-12 00:22:55 +00:00
mailcap.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
markupbase.py Merge the rest of the trunk. 2006-06-08 15:35:45 +00:00
md5.py [ sf.net patch # 1121611 ] 2005-08-21 18:45:59 +00:00
mhlib.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
mimetools.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
mimetypes.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
MimeWriter.py
mimify.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
modulefinder.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
multifile.py Stacks based on lists work better and read more clearly when they 2004-05-04 08:21:52 +00:00
mutex.py * Move collections.deque() in from the sandbox 2004-01-29 06:37:52 +00:00
netrc.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
new.py SF patch 1495675: Remove types.InstanceType and new.instance 2006-05-26 19:12:38 +00:00
nntplib.py Fix a bunch of doctests with the -d option of refactor.py. 2007-02-09 20:13:25 +00:00
ntpath.py Merged revisions 53451-53537 via svnmerge from 2007-02-01 18:02:27 +00:00
nturl2path.py Bug #649974: make docstrings for url2pathname consistent 2005-12-26 22:53:56 +00:00
opcode.py Bytes literal. 2007-02-23 19:56:57 +00:00
optparse.py Checkin the regenerated Python-ast.c and fix test_optparse. 2007-02-11 23:06:17 +00:00
os.py SF patch 1631942 by Collin Winter: 2007-01-10 16:19:56 +00:00
os2emxpath.py Four months of trunk changes (including a few releases...) 2006-12-13 04:49:30 +00:00
pdb.doc bug #989672: pdb.doc and the help messages for the help_d and help_u methods 2004-08-14 15:19:28 +00:00
pdb.py Change all the function attributes from func_* -> __*__. This gets rid 2007-02-25 20:55:47 +00:00
pickle.py Fix a bizarre error where test_pickletools fails if preceded by test_pyclbr. 2007-02-26 07:07:02 +00:00
pickletools.py Change a test to be more predictable. 2007-02-26 15:59:50 +00:00
pipes.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
pkgutil.py SF patch 1631942 by Collin Winter: 2007-01-10 16:19:56 +00:00
platform.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
popen2.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
poplib.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
posixfile.py Add support for FreeBSD 7. 2005-07-17 02:36:59 +00:00
posixpath.py Four months of trunk changes (including a few releases...) 2006-12-13 04:49:30 +00:00
pprint.py Nailed test_weakref.py. Pfew, messy! 2007-02-11 22:59:48 +00:00
profile.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
pstats.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
pty.py Merged revisions 53538-53622 via svnmerge from 2007-02-05 01:24:16 +00:00
py_compile.py Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
pyclbr.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
pydoc.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
Queue.py Four months of trunk changes (including a few releases...) 2006-12-13 04:49:30 +00:00
quopri.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
random.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
re.py SF patch 1631942 by Collin Winter: 2007-01-10 16:19:56 +00:00
repr.py Fix repr.py -- it was triggering on the type name 'long', should be 'int'. 2007-01-15 00:14:39 +00:00
rexec.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
rfc822.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
rlcompleter.py Much-needed merge (using svnmerge.py this time) of trunk changes into p3yk. 2006-05-27 19:21:47 +00:00
robotparser.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
runpy.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
sched.py Refactor: 2004-12-17 13:52:20 +00:00
sgmllib.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
sha.py [ sf.net patch # 1121611 ] 2005-08-21 18:45:59 +00:00
shelve.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
shlex.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
shutil.py Merged revisions 53623-53858 via svnmerge from 2007-02-23 15:07:44 +00:00
SimpleHTTPServer.py Merged revisions 53005-53303 via svnmerge from 2007-01-09 23:18:33 +00:00
SimpleXMLRPCServer.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
site.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
smtpd.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
smtplib.py Fix a bunch of doctests with the -d option of refactor.py. 2007-02-09 20:13:25 +00:00
sndhdr.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
socket.py Kill off softspace completely (except in formatter.py which seems to have 2007-02-09 23:20:19 +00:00
SocketServer.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
sre.py Merge p3yk branch with the trunk up to revision 45595. This breaks a fair 2006-04-21 10:40:58 +00:00
sre_compile.py Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
sre_constants.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
sre_parse.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
stat.py Merged revisions 53623-53858 via svnmerge from 2007-02-23 15:07:44 +00:00
statvfs.py
string.py Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
StringIO.py Kill off softspace completely (except in formatter.py which seems to have 2007-02-09 23:20:19 +00:00
stringold.py Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
stringprep.py Avoid forward-declaring the methods array. 2006-03-10 11:20:04 +00:00
struct.py Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
subprocess.py Merged revisions 53623-53858 via svnmerge from 2007-02-23 15:07:44 +00:00
sunau.py Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
sunaudio.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
symbol.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
symtable.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
tabnanny.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
tarfile.py Merged revisions 53623-53858 via svnmerge from 2007-02-23 15:07:44 +00:00
telnetlib.py Fix a bunch of doctests with the -d option of refactor.py. 2007-02-09 20:13:25 +00:00
tempfile.py SF patch 1631942 by Collin Winter: 2007-01-10 16:19:56 +00:00
textwrap.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
this.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
threading.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
timeit.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
toaiff.py SF patch 1631942 by Collin Winter: 2007-01-10 16:19:56 +00:00
token.py Use better idiom to sort keys. 2007-02-26 14:08:27 +00:00
tokenize.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
trace.py Change all the function attributes from func_* -> __*__. This gets rid 2007-02-25 20:55:47 +00:00
traceback.py Remove the ability to slice/index on exceptions per PEP 352. 2007-02-27 00:15:55 +00:00
tty.py
types.py Change all the function attributes from func_* -> __*__. This gets rid 2007-02-25 20:55:47 +00:00
unittest.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
urllib.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
urllib2.py - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; 2007-02-11 06:12:03 +00:00
urlparse.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
user.py
UserDict.py Some more test now pass. 2007-02-15 04:01:01 +00:00
UserList.py Guido grants a Christmas wish: 2003-12-17 20:43:33 +00:00
UserString.py Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
uu.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
uuid.py Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
warnings.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
wave.py Fix SF #1001053, wave.open() with unicode filename fails 2004-08-01 22:48:06 +00:00
weakref.py Remove the exceptions builtin module, all the exceptions are already builtin. 2007-02-26 22:22:47 +00:00
webbrowser.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
whichdb.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
wsgiref.egg-info Merged revisions 46753-51188 via svnmerge from 2006-08-11 14:57:12 +00:00
xdrlib.py Rip out 'long' and 'L'-suffixed integer literals. 2007-01-15 16:59:06 +00:00
xmllib.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
xmlrpclib.py Fix most trivially-findable print statements. 2007-02-09 05:37:30 +00:00
xreload.py Add a partial list of limitations, stripping out some corresponding XXX comments. 2007-02-26 16:57:52 +00:00
zipfile.py Merged revisions 53623-53858 via svnmerge from 2007-02-23 15:07:44 +00:00