Issue 997166: What's New in 2.4: sorted(): doc bug? (original) (raw)

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".