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: mistyped example
Type: Stage:
Components: Documentation Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: hyeshik.chang, pezely
Priority: normal Keywords:

Created on 2004-07-13 21:41 by pezely, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg21555 - (view) Author: Daniel Pezely (pezely) Date: 2004-07-13 21:41
From "What's New in Python 2.4"
http://www.python.org/dev/doc/devel/whatsnew/node7.html


Under "6 Other Language Changes" section:

Bullet item "There is a new built-in function
sorted(iterable) that works..." first example:

>>> 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]   



To illustrate the point given in the text, the last 2
lines should be:

>>> L                                   # original is
left unchanged
[9,7,8,3,2,4,1,6,5]

That is, it should be without assignment.


Or perhaps:
>>> L == [9,7,8,3,2,4,1,6,5]         # original is left
unchanged
True

msg21556 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-07-17 13:55
Logged In: YES 
user_id=55188

Fixed in whatsnew24.tex 1.70
Thank you!

(Reviewed by Seo Sanghyeon and me at KLDP CodeFest)
History
Date User Action Args
2022-04-11 14:56:05adminsetgithub: 40553
2004-07-13 21:41:50pezelycreate