[Python-Dev] 'compile' error message

Guido van Rossum guido@python.org
Wed, 05 Jun 2002 12:14:45 -0400


> >>> compile("1+*3", "myfile.py", "exec")
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "<string>", line 1
>     1+*3
>       ^
> SyntaxError: invalid syntax
> >>>
> 
> Shouldn't it print "myfile.py" instead of "<string>"?

Yes.

--Guido van Rossum (home page: http://www.python.org/~guido/)