[ python-Bugs-990497 ] mistyped example

SourceForge.net noreply at sourceforge.net
Tue Jul 13 23:41:53 CEST 2004


Bugs item #990497, was opened at 2004-07-13 14:41
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=990497&group_id=5470

Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Daniel Pezely (pezely)
Assigned to: Nobody/Anonymous (nobody)
Summary: mistyped example

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



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

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


More information about the Python-bugs-list mailing list