> 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...?) This has a very low probability to be accepted. It suffers IMO from the "SQL syndrome": having reserved words to the language that are only meaningful in a very specific syntax yet are reserved everywhere. Until we have a general way to avoid that, I'd rather not go that route. --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