> Guido> And then we should also change list.sort(), as Tim points > Guido> out. Maybe we can start introducing this earlier by using > Guido> keyword arguments: > > Guido> list.sort(lt=function) sorts using a < implementation > Guido> list.sort(cmp=function) sorts using a __cmp__ implementation [Andrew Koenig] > The keyword argument might not be necessary: It is always possible > for a function such as sort to figure out whether a comparison > function is 2-way or 3-way (assuming it matters) by doing only one > extra comparison. That's cute, but a bit too magical for my taste... It's not immediately obvious how this would be done (I know how, but it would require a lot of explaining). Plus, -1 is a perfectly valid truth value. --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