diff options
author | Collin Winter <collinw@gmail.com> | 2007-09-10 00:20:46 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-09-10 00:20:46 (GMT) |
commit | 19ab2bd1c7f2a2b93074a4bc03b738d6a6cac74d (patch) | |
tree | 6d0135f15007e03834183d53da35c940322e64e1 /Doc/reference/datamodel.rst | |
parent | 6fe2a6c21b4e0afae589da798e2392662fb140d7 (diff) | |
download | cpython-19ab2bd1c7f2a2b93074a4bc03b738d6a6cac74d.zip cpython-19ab2bd1c7f2a2b93074a4bc03b738d6a6cac74d.tar.gz cpython-19ab2bd1c7f2a2b93074a4bc03b738d6a6cac74d.tar.bz2 |
Remove yet more references to has_key() methods.
Diffstat (limited to 'Doc/reference/datamodel.rst')
-rw-r--r-- | Doc/reference/datamodel.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 29e6220..2e245f2 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1602,7 +1602,7 @@ either to emulate a sequence or to emulate a mapping; the difference is that for a sequence, the allowable keys should be the integers *k* for which ``0 <= k < N`` where *N* is the length of the sequence, or slice objects, which define a range of items. It is also recommended that mappings provide the methods -:meth:`keys`, :meth:`values`, :meth:`items`, :meth:`has_key`, :meth:`get`, +:meth:`keys`, :meth:`values`, :meth:`items`, :meth:`get`, :meth:`clear`, :meth:`setdefault`, :meth:`pop`, :meth:`popitem`, :meth:`copy`, and :meth:`update` behaving similar to those for Python's standard dictionary @@ -1618,8 +1618,8 @@ repetition) by defining the methods :meth:`__add__`, :meth:`__radd__`, described below; they should not define other numerical operators. It is recommended that both mappings and sequences implement the :meth:`__contains__` method to allow efficient use of the ``in`` operator; for mappings, ``in`` -should be equivalent of :meth:`has_key`; for sequences, it should search through -the values. It is further recommended that both mappings and sequences +should search the mapping's keys; for sequences, it should search +through the values. It is further recommended that both mappings and sequences implement the :meth:`__iter__` method to allow efficient iteration through the container; for mappings, :meth:`__iter__` should be the same as :meth:`keys`; for sequences, it should iterate through the values. |