- 01 Mar, 2001 18 commits
-
-
Jeremy Hylton authored
from __future__ import nested_scopes x=7 def f(): x=1 def g(): global x def i(): def h(): return x return h() return i() return g() print f() print x This kind of code didn't work correctly because x was treated as free in i, leading to an attempt to load x in g to make a closure for i. Solution is to make global decl apply to nested scopes unless their is an assignment. Thus, x in h is global.
-
Jeremy Hylton authored
-
Fred Drake authored
-
Skip Montanaro authored
giving it a slight facelift
-
Skip Montanaro authored
-
Ka-Ping Yee authored
-
Fred Drake authored
which does not define all the constants. This closes SF tracker patch #404924.
-
Fred Drake authored
-
Fred Drake authored
WeakValueDictionary.copy(), WeakKeyDictionary.copy(): Actually return the copy!
-
Tim Peters authored
-
Tim Peters authored
-
Tim Peters authored
-
Tim Peters authored
of making new-fangled Mac imports work again. May not work, and may not even compile on his boxes, but should be at worst very close on both.
-
Andrew M. Kuchling authored
-
Jeremy Hylton authored
over the elements of st->st_global!
-
Guido van Rossum authored
find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f to remove all .py[co] files before testing, rather than just those in the Lib/test directory. "find" is used all over the Makefile so I suppose it's safe; how about xargs?
-
Ka-Ping Yee authored
-
Ka-Ping Yee authored
Handle <... at 001B6378> like <... at 0x120f80> (%p is platform-dependent). Fix RCS version tag handling. Move __main__ behaviour into a function, pydoc.cli().
-
- 28 Feb, 2001 22 commits
-
-
Jeremy Hylton authored
Fix test_grammar so that it ignores warning about global stmt at module level in exec.
-
Jeremy Hylton authored
-
Guido van Rossum authored
-
Jeremy Hylton authored
Do better accounting for global variables.
-
Guido van Rossum authored
-
Jack Jansen authored
-
Jeremy Hylton authored
-
Jack Jansen authored
Put PPC distributions back in, rearranged packages and use VISE variable magic to determine which ConfigurePythonXXX to run.
-
Jeremy Hylton authored
-
Fred Drake authored
-
Fred Drake authored
-
Fred Drake authored
-
Jeremy Hylton authored
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.
-
Jeremy Hylton authored
-
Andrew M. Kuchling authored
a subdirectory.
-
Andrew M. Kuchling authored
Remove references to 2.1alpha Update description of PEP229
-
Guido van Rossum authored
moved).
-
Andrew M. Kuchling authored
Update reference Python version to beta1 Rip out PEP 232 section Add placeholders for PEP 236 and 235 Fix erroneous \filename references
-
Andrew M. Kuchling authored
Minor sentence change
-
Guido van Rossum authored
warning.
-
Skip Montanaro authored
-
Guido van Rossum authored
global after assign / use. Note: I'm not updating the PyErr_Warn() call for import * / exec combined with a function, because I can't trigger it with an example. Jeremy, just follow the example of the call to PyErr_WarnExplicit() that I *did* include.
-