strange syntax error
Jerry Hill
malaclypse2 at gmail.com
Fri Jun 4 14:42:00 EDT 2010
On Fri, Jun 4, 2010 at 1:31 PM, _wolf <wolfgang.lipp at gmail.com> wrote:
> File "<whatever>", line 6
> #
> ^
> SyntaxError: invalid syntax
I believe you're encountering this bug:
http://bugs.python.org/issue1184112
It's been fixed for 2.7 and 3.2. Until then, you'll need to work
around it. You can either append a newline to the end of any source
snippets that you are exec-ing, or if you're writing the code snippets
that are being exec-ed yourself, don't write them in such a way that
they trigger the bug.
--
Jerry
More information about the Python-list
mailing list