-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed as not planned
Description
Bug report
Bug description:
Of all integers I have tested (looped through a couple of millions) all tend to have the same value of hash as themselves (hash(i) == i
) except for i == -1
. (There might be some reason for this but it makes for some strange behaviour. For me it meant that hash((4, -1)) == hash((4, -2))
which was rather unexpected.)
assert hash(-1) == -2
CPython versions tested on:
3.9, 3.12
Operating systems tested on:
Linux, Windows
Metadata
Metadata
Assignees
Labels
No labels