CONSTRUCT - Adding Functionality to the Overall System

Ilias Lazaridis ilias at lazaridis.com
Mon Sep 18 23:23:03 EDT 2006


Steve Holden wrote:
> Ilias Lazaridis wrote:
...
> > http://www-128.ibm.com/developerworks/linux/library/l-pymeta.html
> >
> > I am not so much interested in old-style, as is start production with
> > python 2.4 (possibly even with python 2.5).
> >
>
> The fact remains that you won't be able to affect the built-in classes
> such as int and str - they are hard-coded in C (for CPython, at least),
> and so their metaclass is also implied and cannot be changed.

...except in C.

I assume the "root class" should be available/changeable in "C", too.

Do I have to change the sources directly, or does python provide
"C-level-extension/modication" mechanisms, which can be applied to
core-level classes, too?

Is the Python Object Model documented anywhere in a diagram, something
similar to this?:

http://case.lazaridis.com/wiki/RubyObjectModel

.




More information about the Python-list mailing list