[New-bugs-announce] [issue4656] Python 3 tutorial has old information about dicts

Matthew Cowles report at bugs.python.org
Sun Dec 14 05:06:20 CET 2008

New submission from Matthew Cowles <mdcowles at users.sourceforge.net>:

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

assignee: georg.brandl
components: Documentation
messages: 77776
nosy: georg.brandl, mdcowles
severity: normal
status: open
title: Python 3 tutorial has old information about dicts
versions: Python 3.0

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list