~pythonregexp2.7/python/issue2636-01+09-01-01

« back to all changes in this revision

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

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-22 00:02:12 UTC
  • mfrom: (39022.1.34 Regexp-2.7)
  • Revision ID: darklord@timehorse.com-20080922000212-7r0q4f4ugiq57jph
Merged in changes from the Atomic Grouping / Possessive Qualifiers branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
   by the :keyword:`print` statement.
131
131
 
132
132
 
 
133
.. cfunction:: PyObject* PyObject_Bytes(PyObject *o)
 
134
 
 
135
   .. index:: builtin: bytes
 
136
 
 
137
   Compute a bytes representation of object *o*.  In 2.x, this is just a alias
 
138
   for :cfunc:`PyObject_Str`.
 
139
 
 
140
 
133
141
.. cfunction:: PyObject* PyObject_Unicode(PyObject *o)
134
142
 
135
143
   .. index:: builtin: unicode
269
277
   This is the equivalent of the Python expression ``hash(o)``.
270
278
 
271
279
 
 
280
.. cfunction:: long PyObject_HashNotImplemented(PyObject *o)
 
281
 
 
282
   Set a TypeError indicating that ``type(o)`` is not hashable and return ``-1``.
 
283
   This function receives special treatment when stored in a ``tp_hash`` slot,
 
284
   allowing a type to explicitly indicate to the interpreter that it is not
 
285
   hashable.
 
286
 
 
287
   .. versionadded:: 2.6
 
288
 
 
289
 
272
290
.. cfunction:: int PyObject_IsTrue(PyObject *o)
273
291
 
274
292
   Returns ``1`` if the object *o* is considered to be true, and ``0`` otherwise.