copysort patch, was RE: [Python-Dev] inline sort option
Chih-Chung Chang
jo at jan.csie.ntu.edu.tw
Tue Oct 28 20:42:47 EST 2003
More information about the Python-Dev mailing list
Tue Oct 28 20:42:47 EST 2003
- Previous message: Adaptation and typecasting (was Re: [Python-Dev] replacing 'global')
- Next message: [Python-Dev] Looking for master thesis ideas involving Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, Raymond Hettinger wrote: > Okay, this is the last chance to come-up with a name other than > sorted(). > > 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(). > How about adding a builtin function sort() which returns the sorted version of the input list? L.sort() # sort in-place sort(L) # return sorted copy Regards, Chih-Chung Chang
- Previous message: Adaptation and typecasting (was Re: [Python-Dev] replacing 'global')
- Next message: [Python-Dev] Looking for master thesis ideas involving Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list