[Python-3000] Method descriptors

Christian Heimes lists at cheimes.de
Tue Dec 11 01:32:54 CET 2007


Guido van Rossum wrote:
> I guess there's no such egneric wrapper in the core because the use
> case hasn't presented itself before -- or nobody thought of creating a
> generic solution.
> 
> It's also possible that in the past this was done using unbound
> methods -- so perhaps their removal from the method object may have
> been premature.

I had the use case once as I fixed ctypes' COMError for 3.0a2 but it was
easier to change the code than to come up with a generic wrapper type.

A wrapper which takes a PyCFunction is definitely helpful and would make
code porting from 2.x to 3.0 easier. I'm +1 to add one.

Marcin, can you come up with a patch?

Christian




More information about the Python-3000 mailing list