"Guido van Rossum" <guido at python.org> wrote in message news:200310281518.h9SFIj129025 at 12-236-54-216.client.attbi.com... > > Here are some alternatives: > > > > inlinesort() # immediately clear how it is different from sort() > > sortedcopy() # clear that it makes a copy and does a sort > > newsorted() # appropriate for a class method constructor > > > > > > I especially like the last one and all of them provide a distinction > > from list.sort(). > > While we're voting, I still like list.sorted() best, so please keep > that one in the list of possibilities. After thinking about it some more, I also prefer .sorted to suggested alternatives. I read it as follows: list(iterable) means 'make a list from iterable (preserving item order)' list.sorted(iterable) means 'make a sorted list from iterable' While I generally like verbs for method names, the adjective form works here as modifing the noun/verb 'list' and the invoked construction process. 'Inline' strikes me as confusing. 'Copy' and 'new' strike me as redundant noise since, in the new 2.2+ regime, 'list' as a typal verb *means* 'make a new list'. Terry J. Reedy Terry J. Reedy
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