cpython/Python
Jeremy Hylton 961dfe0d85 Fix for SF bug [ #471928 ] global made w/nested list comprehensions
The symbol table pass didn't have an explicit case for the list_iter
node which is used only for a nested list comprehension.  As a result,
the target of the list comprehension was treated as a use instead of
an assignment.  Fix is to add a case to symtable_node() to handle
list_iter.

Also, rework and document a couple of the subtler implementation
issues in the symbol table pass.  The symtable_node() switch statement
depends on falling through the last several cases, in order to handle
some of the more complicated nodes like atom.  Add a comment
explaining the behavior before the first fall through case.  Add a
comment /* fall through */ at the end of case so that it is explicitly
marked as such.

Move the for_stmt case out of the fall through logic, which simplifies
both for_stmt and default.  (The default used the local variable start
to skip the first three nodes of a for_stmt when it fell through.)

Rename the flag argument to symtable_assign() to def_flag and add a
comment explaining its use:

   The third argument to symatble_assign() is a flag to be passed to
   symtable_add_def() if it is eventually called.  The flag is useful
   to specify the particular type of assignment that should be
   recorded, e.g. an assignment caused by import.
2001-10-18 16:15:10 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
atof.c Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774. 2001-07-26 13:41:06 +00:00
bltinmodule.c SF patch #471852 (anonymous) notes that getattr(obj, name, default) 2001-10-16 21:31:32 +00:00
ceval.c For debug build, check that the stack pointer never exceeds the stack size. 2001-10-17 13:29:30 +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 Fix for SF bug [ #471928 ] global made w/nested list comprehensions 2001-10-18 16:15:10 +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 Patch by Jonathan Wight (slightly reformatted) to forestall loading the 2001-08-11 21:54:11 +00:00
dynload_os2.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_shlib.c Patch to bug #472202: Correctly recognize NetBSD before 199712. 2001-10-18 11:45:19 +00:00
dynload_stub.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
dynload_win.c Always pass a full path name to LoadLibraryEx(). Fixes some Windows 9x problems. As discussed on python-dev 2001-05-09 00:50:59 +00:00
errors.c SF bug [#467265] Compile errors on SuSe Linux on IBM/s390. 2001-10-02 21:32:07 +00:00
exceptions.c weakref.ReferenceError becomes a built-in exception now that weak ref objects 2001-10-05 21:50:08 +00:00
fmod.c Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774. 2001-07-26 13:41:06 +00:00
frozen.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
frozenmain.c Add -E command line switch (ignore environment variables like PYTHONHOME 2001-07-23 16:30:27 +00:00
future.c Fix SF bug [ #450245 ] Error in parsing future stmts 2001-08-20 20:32:33 +00:00
getargs.c Undo part of 2.59: 't' case of convertsimple() should not use convertbuffer(). 2001-10-11 14:40:37 +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 Because this code was derived from Python 1.6.1 (amongst others), the 2001-04-12 20:53:31 +00:00
getcwd.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
getmtime.c Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774. 2001-07-26 13:41:06 +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 Very subtle syntax change: in a list comprehension, the testlist in 2001-10-15 15:44:05 +00:00
hypot.c Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774. 2001-07-26 13:41:06 +00:00
import.c Remove a couple of unused local variables (bug #445960, compiler warnings 2001-10-04 14:52:06 +00:00
importdl.c SF patch #471839: Bug when extensions import extensions (Shane Hathaway) 2001-10-16 20:07:34 +00:00
importdl.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
mactoolboxglue.c Replaced PyMac_FullPath by PyMac_FullPathname, which has an extra 'length' 2001-09-10 22:00:39 +00:00
marshal.c fix for part of bug #453523: disable unmarshalling of code objects in 2001-08-30 14:50:20 +00:00
memmove.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
modsupport.c Patch #445762: Support --disable-unicode 2001-08-17 18:39:25 +00:00
mysnprintf.c Add mysnprintf.c to Windows build, + squash compiler wngs in mysnprintf.c. 2001-07-31 22:10:29 +00:00
mystrtoul.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
pyfpe.c Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774. 2001-07-26 13:41:06 +00:00
pystate.c Add a low-level API to access interpreters, for David Beazley. 2001-07-19 12:19:27 +00:00
pythonrun.c SF patch #467455 : Enhanced environment variables, by Toby Dickenson. 2001-10-12 22:17:56 +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 Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774. 2001-07-26 13:41:06 +00:00
structmember.c Put descr name in "bad memberdescr type" error message. 2001-10-16 16:51:56 +00:00
symtable.c Add optional docstrings to member descriptors. For backwards 2001-09-20 20:46:19 +00:00
sysmodule.c Rationalize the events passed to the profiler (no changes for the tracer). 2001-10-04 14:48:42 +00:00
thread.c Partial patch from SF #452266, by Jason Petrone. 2001-10-16 21:13:49 +00:00
thread_beos.h Partial patch from SF #452266, by Jason Petrone. 2001-10-16 21:13:49 +00:00
thread_cthread.h Partial patch from SF #452266, by Jason Petrone. 2001-10-16 21:13:49 +00:00
thread_foobar.h Partial patch from SF #452266, by Jason Petrone. 2001-10-16 21:13:49 +00:00
thread_lwp.h Partial patch from SF #452266, by Jason Petrone. 2001-10-16 21:13:49 +00:00
thread_nt.h Fix a bug in the previous checkin. The wrong bootstrap function was 2001-10-16 21:50:04 +00:00
thread_os2.h Partial patch from SF #452266, by Jason Petrone. 2001-10-16 21:13:49 +00:00
thread_pth.h Partial patch from SF #452266, by Jason Petrone. 2001-10-16 21:13:49 +00:00
thread_pthread.h Partial patch from SF #452266, by Jason Petrone. 2001-10-16 21:13:49 +00:00
thread_sgi.h Partial patch from SF #452266, by Jason Petrone. 2001-10-16 21:13:49 +00:00
thread_solaris.h Partial patch from SF #452266, by Jason Petrone. 2001-10-16 21:13:49 +00:00
thread_wince.h Partial patch from SF #452266, by Jason Petrone. 2001-10-16 21:13:49 +00:00
traceback.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00