[issue46864] Deprecate ob_shash in BytesObject

Ma Lin report at bugs.python.org
Tue Mar 22 03:06:58 EDT 2022


Ma Lin <malincns at 163.com> added the comment:

Since hash() is a public function, maybe some users use hash value to manage bytes objects in their own way, then there may be a performance regression.

For a rough example, dispatch data to 16 servers.

    h = hash(b)
    sendto(server_number=h & 0xF, data=b)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46864>
_______________________________________


More information about the Python-bugs-list mailing list