mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Merged revisions 65810 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r65810 | nick.coghlan | 2008-08-18 23:14:22 +1000 (Mon, 18 Aug 2008) | 1 line Issue 2235: document PyObject_HashNotImplemented ........
This commit is contained in:
parent
36f4952404
commit
7a70a3a6f4
2 changed files with 18 additions and 0 deletions
|
|
@ -257,6 +257,16 @@ is considered sufficient for this determination.
|
|||
This is the equivalent of the Python expression ``hash(o)``.
|
||||
|
||||
|
||||
.. cfunction:: long PyObject_HashNotImplemented(PyObject *o)
|
||||
|
||||
Set a 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 explicit 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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue