diff options
author | Georg Brandl <georg@python.org> | 2008-03-28 12:22:12 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-03-28 12:22:12 (GMT) |
commit | 8ca6c84b6f8a6cd0c76db8937d471bddb4bf2a1d (patch) | |
tree | 891c59c1df48332b3927d78f0295f19fb9954f81 /Doc/tutorial | |
parent | fc8eef3c78200593c9c70974e48ab859779c607a (diff) | |
download | cpython-8ca6c84b6f8a6cd0c76db8937d471bddb4bf2a1d.zip cpython-8ca6c84b6f8a6cd0c76db8937d471bddb4bf2a1d.tar.gz cpython-8ca6c84b6f8a6cd0c76db8937d471bddb4bf2a1d.tar.bz2 |
Phase out has_key usage in the tutorial; correct docs for PyMapping_HasKey*.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r-- | Doc/tutorial/datastructures.rst | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index b6f022c..7ecb049 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -480,8 +480,7 @@ using a non-existent key. The :meth:`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 :meth:`sort` method to the list of keys). To check whether a single key is -in the dictionary, either use the dictionary's :meth:`has_key` method or the -:keyword:`in` keyword. +in the dictionary, use the :keyword:`in` keyword. Here is a small example using a dictionary:: @@ -497,8 +496,6 @@ Here is a small example using a dictionary:: {'guido': 4127, 'irv': 4127, 'jack': 4098} >>> tel.keys() ['guido', 'irv', 'jack'] - >>> tel.has_key('guido') - True >>> 'guido' in tel True |