=== modified file 'Doc/c-api/object.rst'
--- Doc/c-api/object.rst	2008-01-19 22:08:21 +0000
+++ Doc/c-api/object.rst	2010-11-17 12:18:12 +0000
@@ -29,46 +29,66 @@
 
 
 .. cfunction:: PyObject* PyObject_GetAttr(PyObject *o, PyObject *attr_name)
 
    Retrieve an attribute named *attr_name* from object *o*. Returns the attribute
    value on success, or *NULL* on failure.  This is the equivalent of the Python
    expression ``o.attr_name``.
 
 
 .. cfunction:: PyObject* PyObject_GetAttrString(PyObject *o, const char *attr_name)
 
    Retrieve an attribute named *attr_name* from object *o*. Returns the attribute
    value on success, or *NULL* on failure. This is the equivalent of the Python
    expression ``o.attr_name``.
 
 
+.. cfunction:: PyObject* PyObject_GenericGetAttr(PyObject *o, PyObject *name)
+
+   Generic attribute getter function that is meant to be put into a type
+   object's ``tp_getattro`` slot.  It looks for a descriptor in the dictionary
+   of classes in the object's MRO as well as an attribute in the object's
+   :attr:`__dict__` (if present).  As outlined in :ref:`descriptors`, data
+   descriptors take preference over instance attributes, while non-data
+   descriptors don't.  Otherwise, an :exc:`AttributeError` is raised.
+
+
 .. cfunction:: int PyObject_SetAttr(PyObject *o, PyObject *attr_name, PyObject *v)
 
    Set the value of the attribute named *attr_name*, for object *o*, to the value
    *v*. Returns ``-1`` on failure.  This is the equivalent of the Python statement
    ``o.attr_name = v``.
 
 
 .. cfunction:: int PyObject_SetAttrString(PyObject *o, const char *attr_name, PyObject *v)
 
    Set the value of the attribute named *attr_name*, for object *o*, to the value
    *v*. Returns ``-1`` on failure.  This is the equivalent of the Python statement
    ``o.attr_name = v``.
 
 
+.. cfunction:: int PyObject_GenericSetAttr(PyObject *o, PyObject *name, PyObject *value)
+
+   Generic attribute setter function that is meant to be put into a type
+   object's ``tp_setattro`` slot.  It looks for a data descriptor in the
+   dictionary of classes in the object's MRO, and if found it takes preference
+   over setting the attribute in the instance dictionary. Otherwise, the
+   attribute is set in the object's :attr:`__dict__` (if present).  Otherwise,
+   an :exc:`AttributeError` is raised and ``-1`` is returned.
+
+
 .. cfunction:: int PyObject_DelAttr(PyObject *o, PyObject *attr_name)
 
    Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on failure.
    This is the equivalent of the Python statement ``del o.attr_name``.
 
 
 .. cfunction:: int PyObject_DelAttrString(PyObject *o, const char *attr_name)
 
    Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on failure.
    This is the equivalent of the Python statement ``del o.attr_name``.
 
 
 .. cfunction:: PyObject* PyObject_RichCompare(PyObject *o1, PyObject *o2, int opid)
 
    Compare the values of *o1* and *o2* using the operation specified by *opid*,
    which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`,
@@ -117,32 +137,40 @@
    Compute a string representation of object *o*.  Returns the string
    representation on success, *NULL* on failure.  This is the equivalent of the
    Python expression ``repr(o)``.  Called by the :func:`repr` built-in function and
    by reverse quotes.
 
 
 .. cfunction:: PyObject* PyObject_Str(PyObject *o)
 
    .. index:: builtin: str
 
    Compute a string representation of object *o*.  Returns the string
    representation on success, *NULL* on failure.  This is the equivalent of the
    Python expression ``str(o)``.  Called by the :func:`str` built-in function and
    by the :keyword:`print` statement.
 
 
+.. cfunction:: PyObject* PyObject_Bytes(PyObject *o)
+
+   .. index:: builtin: bytes
+
+   Compute a bytes representation of object *o*.  In 2.x, this is just a alias
+   for :cfunc:`PyObject_Str`.
+
+
 .. cfunction:: PyObject* PyObject_Unicode(PyObject *o)
 
    .. index:: builtin: unicode
 
    Compute a Unicode string representation of object *o*.  Returns the Unicode
    string representation on success, *NULL* on failure. This is the equivalent of
    the Python expression ``unicode(o)``.  Called by the :func:`unicode` built-in
    function.
 
 
 .. cfunction:: int PyObject_IsInstance(PyObject *inst, PyObject *cls)
 
    Returns ``1`` if *inst* is an instance of the class *cls* or a subclass of
    *cls*, or ``0`` if not.  On error, returns ``-1`` and sets an exception.  If
    *cls* is a type object rather than a class object, :cfunc:`PyObject_IsInstance`
    returns ``1`` if *inst* is of type *cls*.  If *cls* is a tuple, the check will
@@ -256,32 +284,42 @@
    Python string object in *name*.  It is called with a variable number of
    :ctype:`PyObject\*` arguments.  The arguments are provided as a variable number
    of parameters followed by *NULL*. Returns the result of the call on success, or
    *NULL* on failure.
 
    .. versionadded:: 2.2
 
 
 .. cfunction:: long PyObject_Hash(PyObject *o)
 
    .. index:: builtin: hash
 
    Compute and return the hash value of an object *o*.  On failure, return ``-1``.
    This is the equivalent of the Python expression ``hash(o)``.
 
 
+.. cfunction:: long PyObject_HashNotImplemented(PyObject *o)
+
+   Set a :exc:`TypeError` indicating that ``type(o)`` is not hashable and return ``-1``.
+   This function receives special treatment when stored in a ``tp_hash`` slot,
+   allowing a type to explicitly indicate to the interpreter that it is not
+   hashable.
+
+   .. versionadded:: 2.6
+
+
 .. cfunction:: int PyObject_IsTrue(PyObject *o)
 
    Returns ``1`` if the object *o* is considered to be true, and ``0`` otherwise.
    This is equivalent to the Python expression ``not not o``.  On failure, return
    ``-1``.
 
 
 .. cfunction:: int PyObject_Not(PyObject *o)
 
    Returns ``0`` if the object *o* is considered to be true, and ``1`` otherwise.
    This is equivalent to the Python expression ``not o``.  On failure, return
    ``-1``.
 
 
 .. cfunction:: PyObject* PyObject_Type(PyObject *o)
 
@@ -300,32 +338,36 @@
 
    Return true if the object *o* is of type *type* or a subtype of *type*.  Both
    parameters must be non-*NULL*.
 
    .. versionadded:: 2.2
 
 
 .. cfunction:: Py_ssize_t PyObject_Length(PyObject *o)
                Py_ssize_t PyObject_Size(PyObject *o)
 
    .. index:: builtin: len
 
    Return the length of object *o*.  If the object *o* provides either the sequence
    and mapping protocols, the sequence length is returned.  On error, ``-1`` is
    returned.  This is the equivalent to the Python expression ``len(o)``.
 
+   .. versionchanged:: 2.5
+      These functions returned an :ctype:`int` type. This might require
+      changes in your code for properly supporting 64-bit systems.
+
 
 .. cfunction:: PyObject* PyObject_GetItem(PyObject *o, PyObject *key)
 
    Return element of *o* corresponding to the object *key* or *NULL* on failure.
    This is the equivalent of the Python expression ``o[key]``.
 
 
 .. cfunction:: int PyObject_SetItem(PyObject *o, PyObject *key, PyObject *v)
 
    Map the object *key* to the value *v*.  Returns ``-1`` on failure.  This is the
    equivalent of the Python statement ``o[key] = v``.
 
 
 .. cfunction:: int PyObject_DelItem(PyObject *o, PyObject *key)
 
    Delete the mapping for *key* from *o*.  Returns ``-1`` on failure. This is the

