[New-bugs-announce] [issue37807] Make hash() return a non-negative number

Raymond Hettinger report at bugs.python.org
Sat Aug 10 02:24:05 EDT 2019


New submission from Raymond Hettinger <raymond.hettinger at gmail.com>:

The existing API for the builtin hash() function is inconvenient.  When implementing structure that use a hash value, you never want a negative number.  Running abs(hash(x)) works but is awkward, slower, and loses one bit of entropy.

----------
components: Interpreter Core
messages: 349333
nosy: rhettinger, tim.peters
priority: normal
severity: normal
status: open
title: Make hash() return a non-negative number
type: enhancement
versions: Python 3.9

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


More information about the New-bugs-announce mailing list