[Python-Dev] Should we do away with unbound methods in Py3k?
tjreedy at udel.edu
Thu Nov 22 01:58:37 CET 2007
If I understand correctly, this would negate the need for staticmethod()
when accessing the function via the class (and not instances) since the
main effect of that is to prevent the wrapping. (And since I consider
instance.somestaticmeth() as even less idiomatic Python that
class.somestaticmeth(), I should think staticmethod then could go also.)
This change would certainly reinforce the idea that in Python, methods are
just functions with a special access. It might quiet the calls for
It would make Python slightly easier to learn, I think, since the reason
for unbound method wrapping is not obvious. From what you said, it is a
sacrifice of speed for safety. But this is the only place I can think of
where an argument type-check is automatically applied to user-written
So, +whatever from me for making Python slightly simpler.
More information about the Python-Dev