◐ Shell
clean mode source ↗

Message 63543 - Python tracker

Py3k behavior seems to be better:

Python 3.0a2+ (py3k:61137M, Feb 29 2008, 15:17:29) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
>>> try:    
...   raise ValueError("foo")
... except object:
...   pass
... 
Traceback (most recent call last):
  File "<stdin>", line 3, in <module>
TypeError: catching classes that do not inherit from BaseException is 
not allowed

Something needs to be done for 2.6: at the minimum a warning should be 
issued under -3 option.