mirror of https://github.com/python/cpython.git
Don't replace an empty line with "pass" when symbol == "eval", where
"pass" isn't valid syntax. Reported by Samuele Pedroni on python-dev (May 12, 2003).
This commit is contained in:
parent
11659ade1e
commit
993bc3a708
|
@ -72,7 +72,8 @@ def _maybe_compile(compiler, source, filename, symbol):
|
||||||
if line and line[0] != '#':
|
if line and line[0] != '#':
|
||||||
break # Leave it alone
|
break # Leave it alone
|
||||||
else:
|
else:
|
||||||
source = "pass" # Replace it with a 'pass' statement
|
if symbol != "eval":
|
||||||
|
source = "pass" # Replace it with a 'pass' statement
|
||||||
|
|
||||||
err = err1 = err2 = None
|
err = err1 = err2 = None
|
||||||
code = code1 = code2 = None
|
code = code1 = code2 = None
|
||||||
|
|
Loading…
Reference in New Issue