mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Remove yet more references to has_key() methods.
This commit is contained in:
parent
6fe2a6c21b
commit
19ab2bd1c7
3 changed files with 6 additions and 7 deletions
|
@ -385,8 +385,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::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue