Kaydet (Commit) 993bc3a7 authored tarafından Guido van Rossum's avatar Guido van Rossum

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).
üst 11659ade
......@@ -72,7 +72,8 @@ def _maybe_compile(compiler, source, filename, symbol):
if line and line[0] != '#':
break # Leave it alone
else:
source = "pass" # Replace it with a 'pass' statement
if symbol != "eval":
source = "pass" # Replace it with a 'pass' statement
err = err1 = err2 = None
code = code1 = code2 = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment