[Python-3000] State of the object system

Kay Schluehr kay.schluehr at gmx.net
Thu May 18 08:59:50 CEST 2006


Terry Reedy schrieb:

>>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.
>  
>
Getting rid of C-coded types is certainly an interesting requirement as 
well. I hope PyPythonistas may agree :)

Honestly, I don't understand how a pointer on an implicit/interpreter 
level Trait that stores user defined methods for builtins would slow 
execution down. You would need wrappers only if you permit 
replacing/deleting pre-defined methods and I don't see reasons to be 
permissive here.

Kay




More information about the Python-3000 mailing list