mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Undo recent change that banned using import to bind a global, as per
discussion on python-dev. 'from mod import *' is still banned except at the module level. Fix value for special NOOPT entry in symtable. Initialze to 0 instead of None, so that later uses of PyInt_AS_LONG() are valid. (Bug reported by Donn Cave.) replace local REPR macros with PyObject_REPR in object.h
This commit is contained in:
parent
fb9d712721
commit
483638c9a8
5 changed files with 31 additions and 29 deletions
|
|
@ -368,7 +368,6 @@ from time import time
|
|||
from sys import *
|
||||
from sys import path, argv
|
||||
check_syntax("def f(): from sys import *")
|
||||
check_syntax("def f(): global time; import ")
|
||||
|
||||
print 'global_stmt' # 'global' NAME (',' NAME)*
|
||||
def f():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue