[Python-3000] The case for unbound methods?

Phillip J. Eby pje at telecommunity.com
Fri Mar 7 15:50:38 CET 2008


At 08:59 PM 3/6/2008 -0800, Guido van Rossum wrote:
>Would you mind giving an "executive summary" of your argument that
>doesn't require scanning 40 lines of code?

He's writing a variant of 'partial' that inserts an argument *after* 
the 'self', if there is one, but doesn't rely on 'self' being called 
'self'.  The only way to do that is by having unbound methods.

Personally, I think the error message for calling unbound methods was 
a better argument for keeping them.  (That, and the other use cases 
for unbound methods' im_class that I googled up the last time this 
subject came up.)

See also...

Error message use case:
http://mail.python.org/pipermail/python-dev/2007-November/075361.html

py.test breakage (i.e., your original retraction of unbound-method removal):
http://mail.python.org/pipermail/python-dev/2005-January/051236.html

Misc. Use cases found via Googling:
http://mail.python.org/pipermail/python-dev/2007-November/075308.html



More information about the Python-3000 mailing list