[Python-checkins] r58509 - python/trunk/Doc/c-api/abstract.rst

brett.cannon python-checkins at python.org
Wed Oct 17 01:26:45 CEST 2007


Author: brett.cannon
Date: Wed Oct 17 01:26:45 2007
New Revision: 58509

Modified:
   python/trunk/Doc/c-api/abstract.rst
Log:
Re-order some functions whose parameters differ between PyObject and const char
* so that they are next to each other.


Modified: python/trunk/Doc/c-api/abstract.rst
==============================================================================
--- python/trunk/Doc/c-api/abstract.rst	(original)
+++ python/trunk/Doc/c-api/abstract.rst	Wed Oct 17 01:26:45 2007
@@ -31,21 +31,14 @@
    instead of the :func:`repr`.
 
 
-.. cfunction:: int PyObject_HasAttrString(PyObject *o, const char *attr_name)
+.. cfunction:: int PyObject_HasAttr(PyObject *o, PyObject *attr_name)
 
    Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise.  This
    is equivalent to the Python expression ``hasattr(o, attr_name)``.  This function
    always succeeds.
 
 
-.. 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:: int PyObject_HasAttr(PyObject *o, PyObject *attr_name)
+.. cfunction:: int PyObject_HasAttrString(PyObject *o, const char *attr_name)
 
    Returns ``1`` if *o* has the attribute *attr_name*, and ``0`` otherwise.  This
    is equivalent to the Python expression ``hasattr(o, attr_name)``.  This function
@@ -59,27 +52,34 @@
    expression ``o.attr_name``.
 
 
-.. cfunction:: int PyObject_SetAttrString(PyObject *o, const char *attr_name, PyObject *v)
+.. 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:: 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_SetAttr(PyObject *o, PyObject *attr_name, PyObject *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_DelAttrString(PyObject *o, const char *attr_name)
+.. 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``.
+   This is the equivalent of the Python statement ``del o.attr_name``.
 
 
-.. cfunction:: int PyObject_DelAttr(PyObject *o, PyObject *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``.


More information about the Python-checkins mailing list