diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-12-14 15:09:34 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-12-14 15:09:34 (GMT) |
commit | ff94552763d5ceb33dd646a534b4d1b56e6162cb (patch) | |
tree | 3e26ec9036f281c170fddccda42d2b60d52c7d6c /Doc/tutorial | |
parent | f088e5e6cc0e7ad7991a910be13510ca33e91958 (diff) | |
download | cpython-ff94552763d5ceb33dd646a534b4d1b56e6162cb.zip cpython-ff94552763d5ceb33dd646a534b4d1b56e6162cb.tar.gz cpython-ff94552763d5ceb33dd646a534b4d1b56e6162cb.tar.bz2 |
tip-toe around dictionary keys view in the tutorial
Diffstat (limited to 'Doc/tutorial')
-rw-r--r-- | Doc/tutorial/datastructures.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index 84e731d..0661164 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -440,7 +440,7 @@ pair with ``del``. If you store using a key that is already in use, the old value associated with that key is forgotten. It is an error to extract a value using a non-existent key. -The :meth:`keys` method of a dictionary object returns a list of all the keys +Preforming ``list(d.keys())`` on a dictionary returns a list of all the keys used in the dictionary, in arbitrary order (if you want it sorted, just apply the :meth:`sort` method to the list of keys). To check whether a single key is in the dictionary, use the :keyword:`in` keyword. |