Author: collin.winter
Date: Mon Sep 10 02:20:46 2007
New Revision: 58071

Modified:
   python/branches/py3k/Doc/c-api/abstract.rst
   python/branches/py3k/Doc/reference/datamodel.rst
   python/branches/py3k/Doc/tutorial/datastructures.rst
Log:
Remove yet more references to has_key() methods.

Modified: python/branches/py3k/Doc/c-api/abstract.rst
==============================================================================
--- python/branches/py3k/Doc/c-api/abstract.rst (original)
+++ python/branches/py3k/Doc/c-api/abstract.rst Mon Sep 10 02:20:46 2007
@@ -824,14 +824,14 @@
 .. cfunction:: int PyMapping_HasKeyString(PyObject *o, char *key)
 
    On success, return ``1`` if the mapping object has the key *key* and ``0``
-   otherwise.  This is equivalent to the Python expression ``o.has_key(key)``.
+   otherwise.  This is equivalent to the Python expression ``key in o``.
    This function always succeeds.
 
 
 .. cfunction:: int PyMapping_HasKey(PyObject *o, PyObject *key)
 
    Return ``1`` if the mapping object has the key *key* and ``0`` otherwise.  
This
-   is equivalent to the Python expression ``o.has_key(key)``.  This function 
always
+   is equivalent to the Python expression ``key in o``.  This function always
    succeeds.
 
 

Modified: python/branches/py3k/Doc/reference/datamodel.rst
==============================================================================
--- python/branches/py3k/Doc/reference/datamodel.rst    (original)
+++ python/branches/py3k/Doc/reference/datamodel.rst    Mon Sep 10 02:20:46 2007
@@ -1602,7 +1602,7 @@
 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 @@
 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.

Modified: python/branches/py3k/Doc/tutorial/datastructures.rst
==============================================================================
--- python/branches/py3k/Doc/tutorial/datastructures.rst        (original)
+++ python/branches/py3k/Doc/tutorial/datastructures.rst        Mon Sep 10 
02:20:46 2007
@@ -385,8 +385,7 @@
 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::
 
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to