> > a = [3,2,1] > > print a.sorted() > > print list.sorted(a) > > Actually, yes, it IS compelling indeed. Funny -- I was originally just > brainstorming / musing out loud, never thought about this as a "real > thing". But now that it's matured a bit, I do feel sure [...] If you feel about it that way, I recommend that you let it mature a bit more. If you really like this so much, please realize that you can do this for *any* instance method. The identity C.foo(C()) == C().foo() holds for all "regular" methods. (Since 2.2 it also holds for extension types.) If we were to do this, we'd be back at square two, which we rejected: list instances having both a sort() and a sorted() method (square one being no sorted() method at all :-). --Guido van Rossum (home page: http://www.python.org/~guido/)
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