Weirdness with tp_methods

John Paquin jpaquin at breakawaygames.com
Thu Jun 19 03:32:58 CEST 2003


I just got the most recent .tar and am on winxp.

I'm writing an extension type, using the normal PyTypeObject methods. 
Under 2.2.2 I had no problems, but now (2.2.3b) Python appears to be
ignoring the tp_methods I set.

Instead, it's calling my tp_getattr function with the name of the
method.

if tp_getattr returns a Py_FindMethod() on my method table, everything
works fine.  It calls the method I return.

Is this new functionality?  I've traced into the PyType_Ready()
function and watched it adding the methods from my method table to the
dictionary. I don't know why it's not finding them.

Anybody have any experience with this?




More information about the Python-list mailing list