syntax error : first python program

Bearophile bearophileHUGS at lycos.com
Wed Dec 23 03:46:52 EST 2009


Ben Finney:

> > bash# /usr/bin/python sample.py
> >   File "sample.py", line 2
> >     name = "blah"
> >     ^
> > SyntaxError: invalid syntax
>
> Indentation is syntax in Python.

But I agree, a little better error message may help there, something
that contains "indentation" in it :-)

Bye,
bearophile



More information about the Python-list mailing list