Skip to content

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.

1 participant