[Python-Dev] RE: [Python-checkins] python/dist/src/Python bltinmodule.c, 2.304, 2.305 (original) (raw)
Raymond Hettinger python at rcn.com
Wed Dec 17 16:19:27 EST 2003
- Previous message: [Python-Dev] Re: [Python-checkins] python/dist/src/Python bltinmodule.c, 2.304, 2.305
- Next message: [Python-Dev] RE: [Python-checkins] python/dist/src/Python bltinmodule.c, 2.304, 2.305
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Raymond]
> Guido grants a Christmas wish: > sorted() becomes a regular function instead of a classmethod.
[Neal]
Would sort() be a better name? When I told someone who's done quite a bit of java recently about sorted, he asked if it returned a bool whether the list was sorted or not. :-)
I think sorted() is better:
- the context makes it clear that it's not a predicate
- the name helps distinguish it from list.sort()
- it fits with reversed()
- looking at actual code using sorted(), it reads well
my two cents,
Raymond Hettinger
- Previous message: [Python-Dev] Re: [Python-checkins] python/dist/src/Python bltinmodule.c, 2.304, 2.305
- Next message: [Python-Dev] RE: [Python-checkins] python/dist/src/Python bltinmodule.c, 2.304, 2.305
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]