Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pybind/pybind11
/ hash
Function
hash
include/pybind11/pytypes.h:950–956 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
948
}
949
950
inline ssize_t hash(handle obj) {
951
auto h = PyObject_Hash(obj.ptr());
952
if (h == -1) {
953
throw error_already_set();
954
}
955
return h;
956
}
957
958
/// @} python_builtins
959
Callers
6
TEST_SUBMODULE
Function · 0.85
test_operator_overloading
Function · 0.85
test_overriding_eq_reset_hash
Function · 0.85
test_char_underlying_enum
Function · 0.85
test_bool_underlying_enum
Function · 0.85
TEST_SUBMODULE
Function · 0.85
Calls
1
ptr
Method · 0.80
Tested by
6
TEST_SUBMODULE
Function · 0.68
test_operator_overloading
Function · 0.68
test_overriding_eq_reset_hash
Function · 0.68
test_char_underlying_enum
Function · 0.68
test_bool_underlying_enum
Function · 0.68
TEST_SUBMODULE
Function · 0.68