This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author olau
Recipients georg.brandl, olau
Date 2009-11-03.19:21:58
SpamBayes Score 6.584698e-08
Marked as misclassified No
Message-id <1257276120.66.0.939983786588.issue7257@psf.upfronthosting.co.za>
In-reply-to
Content
If you think it's too long, here's a shorter version:

Sorts sequence in place with a fast stable sort, returning None. key is
a function for extracting a comparison key from each element, e.g.
key=lambda x: x['name'] or key=str.lower. reverse=True reverses the
result order.

a = [1, 3, 2]
a.sort() # a is now [1, 2, 3]

Use the "sorted()" built-in function if you need to preserve the
original list.


Is this better? You could whack the last comment about sorted and/or the
example, then it's about the same length as the other built-in
docstrings (e.g. zip, reduce, getattr).
History
Date User Action Args
2009-11-03 19:22:01olausetrecipients: + olau, georg.brandl
2009-11-03 19:22:00olausetmessageid: <1257276120.66.0.939983786588.issue7257@psf.upfronthosting.co.za>
2009-11-03 19:21:59olaulinkissue7257 messages
2009-11-03 19:21:59olaucreate