list.sort, was Re: [Python-Dev] decorate-sort-undecorate

Charles Cazabon python at
Wed Oct 15 17:28:32 EDT 2003

Kevin J. Butler <python-kbutler at> wrote:
> I think just about everyone gets tripped up by the "sort returns None" 
> behavior, and though one (e.g., BDFL) can declare that it is a less 
> significant stumble than not realizing the list is sorted in place, it 
> is a _continuing_ inconvenience, with virtually every call to [].sort, 
> even for Python experts (like Barry, not me).

Sure.  I regularly find myself wishing "foo.sort().reverse()" and similar
constructions would work, even in-place.

Charles Cazabon                           <python at>
GPL'ed software available at:

More information about the Python-Dev mailing list