Message173816
In fact, nested exception management in python 2 and python 3 actually diverges. BEWARE: (Python 3 does the right thing, once again :-)
"""
Python 2.7.3 (default, Apr 12 2012, 13:11:53)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> try :
... 1/0
... except :
... try :
... raise RuntimeError("TEST")
... except :
... pass
... raise
...
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
RuntimeError: TEST
"""
"""
Python 3.3.0 (default, Oct 2 2012, 02:07:16)
[GCC 4.4.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> try :
... 1/0
... except :
... try :
... raise RuntimeError("TEST")
... except :
... pass
... raise
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
ZeroDivisionError: division by zero
""" |
|
Date |
User |
Action |
Args |
2012-10-26 01:18:07 | jcea | set | recipients:
+ jcea, gregory.p.smith, neologix, Mark.Gius |
2012-10-26 01:18:07 | jcea | set | messageid: <1351214287.23.0.662885928297.issue16327@psf.upfronthosting.co.za> |
2012-10-26 01:18:07 | jcea | link | issue16327 messages |
2012-10-26 01:18:06 | jcea | create | |
|