Exception Handling in Python 3
Steve Holden
steve at holdenweb.com
Mon Oct 25 00:01:02 EDT 2010
On 10/24/2010 7:51 PM, Ben Finney wrote:
> which means, AFAICT, that re-binding ‘__class__’ is only allowed for
> objects of a type defined in the Python run-time heap, not those defined
> in C code (like the built-in-exception types).
Yeah, that's a given. Ruby would probably let you do that, but Python
insists that you don't dick around with the built-in types. And roghtly
so, IMHO.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/
More information about the Python-list
mailing list