no unbound methods in py3k

Christian Heimes lists at cheimes.de
Wed Oct 8 22:11:49 CEST 2008


Thomas Heller wrote:
> but this is very ugly, imo.  Is there another way?
> The raw_func instances that I have are not descriptors (they
> do not implement a __get__() method...)

I've written PyInstanceMethod_Type for this use case. It's not (yet) 
available for Python code. Barry hasn't decided whether he should expose 
the type so late in the release cycle or not. See 
http://bugs.python.org/issue3787 and 
http://docs.python.org/dev/3.0/c-api/method.html?highlight=pyinstancemethod#PyInstanceMethod_Type

Christian




More information about the Python-list mailing list