Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Hash() values #97

Open
pyjsorg opened this Issue · 0 comments

1 participant

@pyjsorg
Owner

Python requires that hash() values should be
1) of numeric type
2) same for values coercible to numeric types, including
>>> hash(True) == hash(1)
True
>>> hash(False) == hash(0)
True

This affects set, dict and possibly other code, which relies on hash() values.
For example, in CPython:

>>> set([True, False, 1, 0])
set([False, True])

while in pyjs its set([True, False, 1, 0])

Original issue: http://code.google.com/p/pyjamas/issues/detail?id=626 (July 01, 2011 08:16:55)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.