On Saturday 18 October 2003 10:54 pm, Dan Aloni wrote: ... > Perhaps it could be made more understandable like: > >>> sorted = lambda x: x.sort() or x > >>> sorted(list(a)) No fair -- that's not a single expression any more!-) > The only problem is that you assume .sort() always returns a non > True value. If some time in the future .sort() would return self, > your code would break and then the rightful usage would be: Why do you think it would break? It would do a _tiny_ amount of avoidable work, but still return the perfectly correct result. Sure you don't think I'd post an unreadable inline hack that would break in the unlikely case the BDFL ever made a change he's specifically Pronounced again, right?-) > I didn't see the begining of this discussion, but it looks to me that > sort() returning self is much better than adding a .copysort(). The BDFL has Pronounced against it: he doesn't LIKE chaining. Alex
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