[Python-Dev] Should we do away with unbound methods in Py3k?

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Nov 23 01:14:44 CET 2007


Guido van Rossum wrote:
> Not quite. You can evolve an API from an instancemethod into a
> staticmethod without changing the call sites.

But is there ever any need to do that, rather than leave
it as an instance method?

Personally it would never have occurred to me to do that.
If you want to be able to override it in subclasses, to
me that's an indication that it should be an instance
method.

Also, what happens if you perform such a migration and
then some subclasser later finds that he wants access to
'self'?

I don't see this as a use case worth supporting.

--
Greg


More information about the Python-Dev mailing list