[Python-Dev] Getting rid of unbound methods: patch available

Nick Coghlan ncoghlan at iinet.net.au
Tue Jan 18 03:46:03 EST 2005


Guido van Rossum wrote:
> What do people think? (My main motivation for this, as stated before,
> is that it adds complexity without much benefit.)

Something important that came up in my response to Marc-Andre:

What about C method implementations which are relying on this typecheck and 
assuming that 'self' is (nearly) guaranteed to be of the correct type?

The string object implementation is where I noticed this assumption being made, 
but I suspect it would be fairly widespread.

Obviously, use of im_func can break such code already, but that's a far cry from 
having C.f skip the type check.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at email.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.skystorm.net



More information about the Python-list mailing list