[Python-3000] Unbound methods -- keep creating API?

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Nov 27 07:43:16 CET 2007

Guido van Rossum wrote:
> They have that too. See:
>>>>f = list.append
>>>>g = f.__get__(a)
> <built-in method append of list object at 0x590f8>

Hmmm. It seems that C method objects are more
like an unbound method object that's pre-bound to a
particular class.

I'm concerned with built-in function objects that
are *not* methods of anything. I'm suggesting they
should behave the same way as a Python function when
you put one in a class, i.e. accessing it through an
instance creates a bound method.

If that were the case, then Pyrex wouldn't have
to do anything special to create a Python class
containing a method implemented in Pyrex, and
unbound method objects could cease to exist without
causing Pyrex any problem.


More information about the Python-3000 mailing list