You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the hash of str, as returned by PyObject_Hash, has been cached and is immediately available, return it.
Otherwise, return -1without setting an exception.
If str is not a string (that is, if PyUnicode_Check(obj) is false), the behavior is undefined.
This function never fails with an exception.
Note that there are no guarantees on when a object's hash is cached, and the (non-)existence of a cached hash does not imply that the string has any other properties.
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Activity
gh-134891: Add PyUnstable_Unicode_GET_CACHED_HASH (GH-134892)
pythongh-134891: Add PyUnstable_Unicode_GET_CACHED_HASH (pythonGH-134892
pythongh-134891: Add PyUnstable_Unicode_GET_CACHED_HASH (pythonGH-134892
pythongh-134891: Add PyUnstable_Unicode_GET_CACHED_HASH (pythonGH-134892