variable declaration

Fredrik Lundh fredrik at pythonware.com
Tue Feb 8 12:19:51 EST 2005


"top" <alexandre.tp at gmail.com> wrote:

> That thing about syntax errors is news to me. I thought they were
> caught at runtime, since you can catch them as exceptions, as in:
>
> try: prijnt projnt
> except SyntaxError: print "See, it gets caught"
>
> If this happens at compile-time, I'd like to know how.

$ python sample.py
  File "sample.py", line 1
    try: prijnt projnt
                     ^
SyntaxError: invalid syntax

</F> 






More information about the Python-list mailing list