SyntaxError exception 1.5.1 vs 1.5.2

Aahz Maruch aahz at netcom.com
Wed Sep 1 12:10:54 EDT 1999


In article <7q7822$ba6$1 at nnrp1.deja.com>,  <chris at journyx.com> wrote:
>
>i've noticed differences between 1.5.1 and 1.5.2 wrt: handling a
>SyntaxError exception. Which behavior is correct?
>
>Here is the scenario:
>
>bad_syntax.py:
>hello"
>
>build_py.py:
>import sys
>
>try:
>	py_compile.compile('bad_syntax.py')
>	print "after compile"
>except:
>	print "compile error"
>
>now the output:
>
>python1.5.1:
>compile error
>
>python1.5.2:
>File "bad_syntax.py", line 1
>    hello"
>         ^
>SyntaxError: invalid token
>after compile

I dunno.  Tim? Fred? Fredrik?  Yoo-hoo!
--
                      --- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het    <*>      http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6  (if you want to know, do some research)




More information about the Python-list mailing list