New User Question: extension types and python 2.2/class/type

tom barket thomas_barket at yahoo.com
Wed Jul 25 22:21:39 EDT 2001


Hello,

I am relatively new to python and am about to embark on my first
significant "extension type" project (which will involve wrapping and
exposing some large c++ classes i have - and no, i dont think SWIG can
accommodate my c++).  Having followed the class/type unification
discussions somewhat and read Guido's "Unifying types and classes in
python 2.2" tutorial, it seems to me that chapter 2 "Defining New
Types" in the "Extending and Embedding the Python Interpreter" doc is
about to become obsolete (in the sense that what it describes will
shortly *not* be the prefered way to define/import new types).  Since
this was going to be my guide for my own extension type endeavor, I
would like to ask how can i get instructions for correctly writing an
"extension type" under the new (or actually soon-to-be-new) regime.

Can someone kindly offer me advice on how to proceed?  I have not yet
implemented any metaclasses, but i am familiar with their concept.  I
would rather do this correctly under the new regime the first time if
possible, so i dont have to go back and change it in 2 months.

Thanks,
Tom
thomas_barket at yahoo.com



More information about the Python-list mailing list