[ python-Bugs-997166 ] What's New in 2.4: sorted(): doc bug?

SourceForge.net noreply at sourceforge.net
Mon Jul 26 20:40:53 CEST 2004


Bugs item #997166, was opened at 2004-07-24 14:48
Message generated for change (Settings changed) made by akuchling
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=997166&group_id=5470

Category: Documentation
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Michael Dyck (jmdyck)
Assigned to: A.M. Kuchling (akuchling)
Summary: What's New in 2.4: sorted(): doc bug?

Initial Comment:
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".


----------------------------------------------------------------------

>Comment By: A.M. Kuchling (akuchling)
Date: 2004-07-26 14:40

Message:
Logged In: YES 
user_id=11375

Fixed in CVS; thanks!


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=997166&group_id=5470


More information about the Python-bugs-list mailing list