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

Use bytes() on keys to be hashable in Python3 #2243

Open
wants to merge 1 commit into
base: v0.6
Choose a base branch
from

Conversation

kashikoibumi
Copy link

This patch is a preparation to migration to Python3.

Use bytes() on keys to be hashable in Python3.
Hash keys used in hashtables must be hashable.
Although it is not problem in Python2, it is a problem in Python3.
When slice or memoryview of mutable byte array is used as hash key in Python3, an exception is raised.
To resolve the problem, this patch convert hash keys to immutable bytes by using bytes() function.

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