Benjamin Peterson <benja...@python.org> added the comment: Actually anything before the last statement will cause this
>>> compile("\ndef foo(", '', 'exec') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "", line 2 def foo( ^ SyntaxError: invalid syntax ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12216> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com