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).
diff --git a/Lib/codeop.py b/Lib/codeop.py
index cc9d5b2..e7c0f1f 100644
--- a/Lib/codeop.py
+++ b/Lib/codeop.py
@@ -72,7 +72,8 @@
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