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.

Title: Python 3 tutorial has old information about dicts
Type: Stage:
Components: Documentation Versions: Python 3.0
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: benjamin.peterson, georg.brandl, mdcowles
Priority: normal Keywords:

Created on 2008-12-14 04:06 by mdcowles, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg77776 - (view) Author: Matthew Cowles (mdcowles) Date: 2008-12-14 04:06
[From a question sent to the python-help list.]

In the Python 3 tutorial at:

it says:

The keys() method of a dictionary object returns a list of all the keys 
used in the dictionary, in arbitrary order if you want it sorted, just 
apply the sort() method to the list of keys

But in What's New in Python 3.0 at:

it says:

dict methods dict.keys(), dict.items() and dict.values() return “views” 
instead of lists. For example, this no longer works: k = d.keys(); 
k.sort(). Use k = sorted(d) instead

I expect that it's just a matter of updating the tutorial.
msg77800 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-12-14 15:09
Thanks! Fixed in r67755.
Date User Action Args
2022-04-11 14:56:42adminsetgithub: 48906
2008-12-14 15:09:58benjamin.petersonsetstatus: open -> closed
nosy: + benjamin.peterson
resolution: fixed
messages: + msg77800
2008-12-14 04:06:19mdcowlescreate