cpython/Python
Jeremy Hylton 4419ac1a97 Add warning/error handlin for problematic nested scopes cases as
described in PEP 227.

symtable_check_unoptimized() warns about import * and exec with "in"
when it is used in a function that contains a nested function with
free variables.  Warnings are issued unless nested scopes are in
effect, in which case these are SyntaxErrors.

symtable_check_shadow() warns about assignments in a function scope
that shadow free variables defined in a nested scope.  This will
always generate a warning -- and will behave differently with nested
scopes than without.

Restore full checking for free vars in children, even when nested
scopes are not enabled.  This is needed to support warnings for
shadowing.

Change symtable_warn() to return an int-- the return value of
PyErr_WarnExplicit.

Sundry cleanup: Remove commented out code.  Break long lines.
2001-02-28 22:54:51 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
atof.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
bltinmodule.c Backed out the unistr() builtin. 2001-01-19 21:36:19 +00:00
ceval.c Remove trailing comma from 'why_code' enum, which was introduced by the 2001-02-16 11:52:31 +00:00
codecs.c Rationalize use of limits.h, moving the inclusion to Python.h. 2000-09-26 05:46:01 +00:00
compile.c Add warning/error handlin for problematic nested scopes cases as 2001-02-28 22:54:51 +00:00
dup2.c Mass ANSIfication of function definitions. Doesn't cover all 'extern' 2000-07-22 18:47:25 +00:00
dynload_aix.c Fix the char* vs. const char* mismatch for the argument of aix_loaderror() 2000-09-04 00:54:56 +00:00
dynload_beos.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_dl.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_hpux.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_mac.c Use #if TARGET_API_MAC_CARBON to determine carbon/classic macos, not #ifdef. 2001-01-19 23:34:06 +00:00
dynload_next.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_os2.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_shlib.c Oops, one more part of the cygwin patch (SF patch #102409 by jlt63: 2001-01-10 21:17:27 +00:00
dynload_stub.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_win.c Detect conflicting Python DLL on module import under Windows - as per [ Patch #101676 ] 2000-10-05 10:54:45 +00:00
errors.c Add PyErr_WarnExplicit(), which calls warnings.warn_explicit(), with 2001-02-28 21:46:24 +00:00
exceptions.c SyntaxError__init__(): Be a little more robust when picking apart the 2001-02-28 21:52:10 +00:00
fmod.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
frozen.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
frozenmain.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
future.c Improve SyntaxErrors for bad future statements. Set file and location 2001-02-28 17:47:12 +00:00
getargs.c Related to SF bug 132008 (PyList_Reverse blows up). 2001-02-12 22:13:26 +00:00
getcompiler.c The GCC version is loooooooooong; put it on a new line. 2000-09-05 04:40:39 +00:00
getcopyright.c Add my name to the copyright notice. 2001-01-18 14:50:11 +00:00
getcwd.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
getmtime.c Move distributed and duplicated config for stat() and fstat() into pyport.h. 2001-01-18 03:03:16 +00:00
getopt.c Move our own getopt() implementation to _PyOS_GetOpt(), and use it 2000-11-03 08:18:37 +00:00
getplatform.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
getversion.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
graminit.c Support for three-token characters (**=, >>=, <<=) which was written by 2000-08-24 20:11:32 +00:00
hypot.c merge Include/my*.h into Include/pyport.h 2000-07-31 15:28:04 +00:00
import.c Ack -- my eyes are getting bleary. Typos in the comment typo repairs. 2001-02-28 05:57:51 +00:00
importdl.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
importdl.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
marshal.c It's unclear whether PyMarshal_XXX() are part of the public or private API. 2001-01-28 00:27:39 +00:00
memmove.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
modsupport.c Rationalize use of limits.h, moving the inclusion to Python.h. 2000-09-26 05:46:01 +00:00
mystrtoul.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
pyfpe.c Mass ANSIfication of function definitions. Doesn't cover all 'extern' 2000-07-22 18:47:25 +00:00
pystate.c Add a new API, PyThreadState_DeleteCurrent() that combines 2001-01-23 01:46:06 +00:00
pythonmain.c
pythonrun.c Now that Jeremy is asking about this code, it looks really bogus to me, 2001-02-28 20:58:04 +00:00
sigcheck.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
strdup.c Mass ANSIfication of function definitions. Doesn't cover all 'extern' 2000-07-22 18:47:25 +00:00
strerror.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
strtod.c Mass ANSIfication of function definitions. Doesn't cover all 'extern' 2000-07-22 18:47:25 +00:00
structmember.c SF bug http://sourceforge.net/bugs/?func=detailbug&bug_id=130242&group_id=5470 2001-01-27 06:20:08 +00:00
symtable.c Improved __future__ parser; still more to do 2001-02-27 19:07:02 +00:00
sysmodule.c Neil discovered a bad DECREF on warnoptions, that caused repeated 2001-01-13 22:06:05 +00:00
thread.c Donn Cave <donn@u.washington.edu>: 2000-10-06 15:48:38 +00:00
thread_beos.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_cthread.h Fix syntax error. Submitted by Bill Bumgarner. Apparently this is 2000-11-13 19:45:45 +00:00
thread_foobar.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_lwp.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_nt.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_os2.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_pth.h Andy Dustman <adustman@users.sourceforge.net>: 2000-10-12 20:58:32 +00:00
thread_pthread.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_sgi.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_solaris.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
thread_wince.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
traceback.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00