Jesus Cea wrote: > Amaury Forgeot d'Arc wrote: > | I think you were close, you just have to be careful to call > | PyType_Ready in the module init function, > | to create the descriptors for each tp_methods and tp_members entries. > > Already done :). Thanks for answering. > > My doubt now is how do write a *clever* "getattr" routine without > "Py_FindMethod".
Well, I'd write a "tp_getattro" member function, which would do its "clever" things before it falls back to PyObject_GenericGetAttr to get the usual behaviour. Or did you mean something more "clever"? -- Amaury Forgeot d'Arc _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com