Message9298
Logged In: YES
user_id=6380
Sorry, HEAPTYPE is not the proper way to check for a
new-style class; it would exclude any new-style classes
defined by C code. I also think that if you want to do this
it should done properly, and allow "raise C, C()" as well.
At best there's agreement that it's not worth trying to fix
Python to allow new-style classes as exceptions when we're
also trying to encourage that exceptions derive from
Exception.
If your module declares its exceptions as deriving from
Exception, a __metaclass__ = type should not have any effect
on the exceptions you declare. So I'm not sure what your
problem is?
Here's another idea for a patch: a new-style class is
allowed as long as it also inherits from Exception. (This
is possible!) |
|
Date |
User |
Action |
Args |
2007-08-23 13:59:16 | admin | link | issue518846 messages |
2007-08-23 13:59:16 | admin | create | |
|