On 29 oct, 12:46, Alan Isaac <[EMAIL PROTECTED]> wrote: > Is the behavior below expected? > If so, why is the exception not caught? > Thanks, > Alan Isaac > > >>> x,y='','' > >>> try: x/y > > ... except TypeError: print 'oops' > ... > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: unsupported operand type(s) for /: 'str' and 'str'
It works for me, using 2.5.1 and 2.4.3 on Windows XP. Perhaps you reassigned TypeError? Python 2.5 says: py> TypeError <type 'exceptions.TypeError'> Earlier versions: py> TypeError <class exceptions.TypeError at 0x009B4570> -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list