The problem is even worse when we consider constructors (__init__() method).
There is never an instance to use to register the __init__() method
because the point of the method is to create a new instance. If we do have
an instance then we can register it's __init__() method so that it can be
called from C using call_object(), but that will clearly pass in the wrong
self argument. How does one create a new instance of an object from C? Is
it sufficient to register the Class object and then use call_object() on
that? Is call_object() smart enough to know that if it is given a handle
to a Class object then it automatically calls the constructor?
So far I am quite impressed with the interfaces provided to call C from
Python and vice-versa. The ability to register an unbound method and
explicitly provide a self pointer from C would make it much more useful.
Andy Bensky
InfoSeek Corp.