~ubuntu-branches/ubuntu/karmic/python3.0/karmic

« back to all changes in this revision

Viewing changes to Doc/c-api/object.rst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-02-16 17:18:23 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090216171823-1d5cm5qnnjvmnzzm
Tags: 3.0.1-0ubuntu1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
   *opid*.
90
90
 
91
91
 
92
 
.. cfunction:: int PyObject_Cmp(PyObject *o1, PyObject *o2, int *result)
93
 
 
94
 
   .. index:: builtin: cmp
95
 
 
96
 
   Compare the values of *o1* and *o2* using a routine provided by *o1*, if one
97
 
   exists, otherwise with a routine provided by *o2*.  The result of the comparison
98
 
   is returned in *result*.  Returns ``-1`` on failure.  This is the equivalent of
99
 
   the Python statement ``result = cmp(o1, o2)``.
100
 
 
101
 
 
102
 
.. cfunction:: int PyObject_Compare(PyObject *o1, PyObject *o2)
103
 
 
104
 
   .. index:: builtin: cmp
105
 
 
106
 
   Compare the values of *o1* and *o2* using a routine provided by *o1*, if one
107
 
   exists, otherwise with a routine provided by *o2*.  Returns the result of the
108
 
   comparison on success.  On error, the value returned is undefined; use
109
 
   :cfunc:`PyErr_Occurred` to detect an error.  This is equivalent to the Python
110
 
   expression ``cmp(o1, o2)``.
111
 
 
112
 
 
113
92
.. cfunction:: PyObject* PyObject_Repr(PyObject *o)
114
93
 
115
94
   .. index:: builtin: repr
262
241
   allowing a type to explicitly indicate to the interpreter that it is not
263
242
   hashable.
264
243
 
265
 
   .. versionadded:: 2.6
266
 
 
267
244
 
268
245
.. cfunction:: int PyObject_IsTrue(PyObject *o)
269
246