compile() error

Iuri iurisilvio at gmail.com
Wed May 19 18:12:30 EDT 2010


>>> compile("for i in [1,2,3]:\n pass\n#end\n", "test_file.py", "exec")
<code object <module> at 0x266a378, file "test_file.py", line 1>
>>> compile("for i in [1,2,3]:\n pass\n#end", "test_file.py", "exec")
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "<input>", line 2, in cptest
File "test_file.py", line 3
#end
^
SyntaxError: invalid syntax

I guess these commands explain the problem.

Any ideas about what is happening?

Regards,
iuri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100519/b7c07015/attachment.html>


More information about the Python-list mailing list