From: Samuele Pedroni Date: Fri, 16 May 2003 21:57:23 +0000 (+0000) Subject: Backport fix for compile_command("",symbol="eval") raising syntax error about "pass... X-Git-Tag: v2.2.3c1~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6f25f29ffa8e61d3490e82877f12529142b8bb78;p=thirdparty%2FPython%2Fcpython.git Backport fix for compile_command("",symbol="eval") raising syntax error about "pass". Now returns None. --- diff --git a/Lib/codeop.py b/Lib/codeop.py index c97b4df29354..327f80dedb4a 100644 --- a/Lib/codeop.py +++ b/Lib/codeop.py @@ -70,7 +70,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