The patch implements the instancemethod wrapper as discussed on the py3k mailing list. The patch is roughly based on Marcin Kowalczyk patch but it contains more fancy slots like repr, call etc. The rest is mostly based on PyMethod_Type.
The wrapper is useful for C code which used PyMethod_New(func, NULL, type) in 2.5. W/o a wrapper people may have to rewrite and redesign their code base. For example see http://bugs.python.org/issue1505 and r59215. I had to rewrite a good bunch of code just to get one C function right. I'm +1 to add a wrapper and +0 to expose it to Python code and -0 to expose it as built-in. I used a built-in for quick testing.
OK, you've convinced me. Let's just make it a C API for now. On Dec 11, 2007 10:56 AM, Christian Heimes <report@bugs.python.org> wrote: > > Christian Heimes added the comment: > > The wrapper is useful for C code which used PyMethod_New(func, NULL, > type) in 2.5. W/o a wrapper people may have to rewrite and redesign > their code base. > > For example see http://bugs.python.org/issue1505 and r59215. I had to > rewrite a good bunch of code just to get one C function right. > > I'm +1 to add a wrapper and +0 to expose it to Python code and -0 to > expose it as built-in. I used a built-in for quick testing. > > > __________________________________ > Tracker <report@bugs.python.org> > <http://bugs.python.org/issue1587> > __________________________________ >