Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 persistent_hash was broken. Go back to builtin hash instead. #616

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

gilessbrown
Copy link
Contributor

I was trying the examples/util/estimate_pi.py example on a Python 3 Disco installation and it was failing in a call to persistent_hash because it was trying to run str_to_bytes on an integer and failing because it has no 'encode' method.

I see from the discussion groups that at least one other person has had a problem with this persistent_hash.

Having looked at it I can't see any reason why the Python 3 code can't use the builtin 'hash' function just like the Python 2 code does.

It's hard so second guess the reason as to why the persistent_hash function was added. At least as far as the estimate_pi example goes I get an answer instead of an exception (as long as I fix the print statement at the bottom of the file).

Giles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant