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.

classification
Title: What's New in 2.4: sorted(): doc bug?
Type: Stage:
Components: Documentation Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, jmdyck
Priority: normal Keywords:

Created on 2004-07-24 18:48 by jmdyck, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg21797 - (view) Author: Michael Dyck (jmdyck) Date: 2004-07-24 18:48
http://www.python.org/dev/doc/devel/whatsnew/node7.html
("What's New in Python 2.4": "Other Language Changes")
In the blurb for sorted(), it has:

>>> L = [9,7,8,3,2,4,1,6,5]
>>> [10+i for i in sorted(L)]       # usable in a list 
comprehension
[11, 12, 13, 14, 15, 16, 17, 18, 19]
>>> L = [9,7,8,3,2,4,1,6,5]         # original is left 
unchanged
[9,7,8,3,2,4,1,6,5]

I think the second-last line should just be
>>> L    # original is left unchanged

----

Also, in

>>> sorted('Monte Python')

it might be less distracting to use the 'standard' 
spelling "Monty".
msg21798 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2004-07-26 18:40
Logged In: YES 
user_id=11375

Fixed in CVS; thanks!
History
Date User Action Args
2022-04-11 14:56:05adminsetgithub: 40636
2004-07-24 18:48:54jmdyckcreate