Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Python/bltinmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1623,15 +1623,18 @@ hash as builtin_hash
obj: object
/

Return the hash value for the given object.
Return the integer hash value for the given object within this process.
Comment thread
gpshead marked this conversation as resolved.
Outdated
Comment thread
gpshead marked this conversation as resolved.
Outdated

Two objects that compare equal must also have the same hash value, but the
reverse is not necessarily true.
reverse is not necessarily true. Hash values may vary between Python
processes.
Comment thread
gpshead marked this conversation as resolved.
Outdated

This hash value is used internally by Python dict and set hash tables.
Comment thread
gpshead marked this conversation as resolved.
Outdated
[clinic start generated code]*/

static PyObject *
builtin_hash(PyObject *module, PyObject *obj)
/*[clinic end generated code: output=237668e9d7688db7 input=58c48be822bf9c54]*/
/*[clinic end generated code: output=237668e9d7688db7 input=587834cbab541b99]*/
{
Py_hash_t x;

Expand Down
9 changes: 6 additions & 3 deletions Python/clinic/bltinmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.