A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-November/075288.html below:

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

[Python-Dev] Should we do away with unbound methods in Py3k? [Python-Dev] Should we do away with unbound methods in Py3k?Terry Reedy 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 
'implicit' self.

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 
functions.

So, +whatever from me for making Python slightly simpler.

tjr



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4