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

Error happened : Python 3.6 Django 1.8.6 #9

Open
dreammis opened this issue Aug 17, 2018 · 2 comments
Open

Error happened : Python 3.6 Django 1.8.6 #9

dreammis opened this issue Aug 17, 2018 · 2 comments

Comments

@dreammis
Copy link

function patch_mysql

class hashabledict(dict):
        def __hash__(self):
            return hash(tuple(sorted(list(self.items()))))

Python 2 is OK, Maybe it is occured by the different version of Python to convert data structure.

@sxf123
Copy link

sxf123 commented May 16, 2019

请问python3.6版本的解决了么?

@dreammis
Copy link
Author

请问python3.6版本的解决了么?

return hash(tuple(self.items()))
u can do it like this:
in python3 dict is ordered.

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

No branches or pull requests

2 participants