summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-02-01 20:20:45 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-02-01 20:20:45 (GMT)
commit483638c9a865d504b1131c098f010590103415dd (patch)
treecc49b6b15d72f8cdf4b34e4c4f681f30c35c3521 /Lib
parentfb9d7127211447337602ab1d5c8f2920302e8525 (diff)
downloadcpython-483638c9a865d504b1131c098f010590103415dd.zip
cpython-483638c9a865d504b1131c098f010590103415dd.tar.gz
cpython-483638c9a865d504b1131c098f010590103415dd.tar.bz2
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
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/output/test_grammar1
-rw-r--r--Lib/test/test_grammar.py1
2 files changed, 0 insertions, 2 deletions
diff --git a/Lib/test/output/test_grammar b/Lib/test/output/test_grammar
index a262e79..172a597 100644
--- a/Lib/test/output/test_grammar
+++ b/Lib/test/output/test_grammar
@@ -37,7 +37,6 @@ return_stmt
raise_stmt
import_stmt
SyntaxError expected for "def f(): from sys import *"
-SyntaxError expected for "def f(): global time; import "
global_stmt
exec_stmt
if_stmt
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index 022398d..6e0fe91 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -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():