Exception Handling in Python 3
Gregory Ewing
greg.ewing at canterbury.ac.nz
Fri Oct 29 05:21:33 EDT 2010
Steve Holden wrote:
> 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.
Some restrictions on this are necessary -- it obviously
wouldn't be safe to allow replacing the class of an
object with one having an incompatible C layout, and
most built-in types have their own unique layout.
I think it's easier in Ruby, because all objects in
Ruby look pretty much the same at the C level. Not
sure of the details, though.
--
Greg
More information about the Python-list
mailing list