On Monday, October 13, 2003, at 02:34 PM, Raymond Hettinger wrote: > For Py2.4, I propose adding an optional list.sort() argument to > support the decorate-sort-undecorate pattern. I've seen proposals for an extension to list comprehension, which would be quite nice: [s for s in lst sortby s.lower()] It reads nicely, and avoids lambdas and tiny helper functions. Also handles the sort-returns-None criticism. But it adds syntax. And since it's not an in-place sort it won't perform as well (but probably better than the decorator idiom anyway...?) -- Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
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