Re: [Python-3000] Help replacing Py_FindMethod

2008-07-29 Thread Jeremy Kloth
On Tue July 29 2008 8:42:08 am Jesus Cea wrote: > Amaury Forgeot d'Arc wrote: > |> 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 > | PyOb

Re: [Python-3000] Help replacing Py_FindMethod

2008-07-29 Thread Amaury Forgeot d'Arc
Jesus Cea wrote: > Amaury Forgeot d'Arc wrote: > |> 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

Re: [Python-3000] Help replacing Py_FindMethod

2008-07-29 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Amaury Forgeot d'Arc wrote: |> 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_GenericGe

Re: [Python-3000] Help replacing Py_FindMethod

2008-07-29 Thread Amaury Forgeot d'Arc
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 d

Re: [Python-3000] Help replacing Py_FindMethod

2008-07-29 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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 d

Re: [Python-3000] Help replacing Py_FindMethod

2008-07-21 Thread Amaury Forgeot d'Arc
Jesus Cea wrote: > Good night everybody!. > > Working on the Python3.0 support for bsddb I see that "Py_FindMethod" > was just removed in Python last beta. > > Most uses of "Py_FindMethod" can be resolved as (as far as I know): > > 1. Delete the getattr routine. > 2. Put a "0" in the getattr slot i

[Python-3000] Help replacing Py_FindMethod

2008-07-18 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Good night everybody!. Working on the Python3.0 support for bsddb I see that "Py_FindMethod" was just removed in Python last beta. Most uses of "Py_FindMethod" can be resolved as (as far as I know): 1. Delete the getattr routine. 2. Put a "0" in th