[Python-3000] State of the object system
Terry Reedy
tjreedy at udel.edu
Wed May 17 21:21:14 CEST 2006
"Michael Chermside" <mcherm at mcherm.com> wrote in message
news:20060517053503.oq4mtmzuzmv4s4sw at login.werra.lunarpages.com...
> However, this is more of a practice than a prohibition... it IS
> possible to modify existing classes in Python.
If the class is defined/written in Python.
> Unfortunately, for implementation reasons you can't modify most
> built-in (and some user-defined) classes in this fashion:
Being able to add Python-coded functions as methods of compiled C-coded
types/classes (builting or otherwise) would require some wrapping machinery
that would slow down normal usage.
tjr
More information about the Python-3000
mailing list