[Python-Dev] Exceptions *must*? be old-style classes?

Phillip J. Eby pje at telecommunity.com
Sun Jan 16 16:18:21 CET 2005


At 10:28 AM 1/16/05 +0100, Martin v. Löwis wrote:
>Phillip J. Eby wrote:
>>Couldn't we require new-style exceptions to inherit from Exception?
>>Since there are no new-style exceptions that work now, this can't break 
>>existing code.
>
>This would require to make Exception a new-style class, right?

 >>> class MyException(Exception,object): pass

 >>>

Not as far as I can see, no.



More information about the Python-Dev mailing list