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

Make bindings.py 2-3 compatible #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

user202729
Copy link

@user202729 user202729 commented Sep 3, 2018

Fixes #47.

Running the code in Python 2 and 3 produces nearly the same output, the only difference is because hash function in Python 2 and 3 are different, which lead to different dict order. Replacing all {} with OrderedDict() from collections makes the output identical.

Besides, the cmake file should probably use https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython to detect Python interpreter instead of just python.

The comment "I'm a Python 2 script" may be changed too. (to mention 2-3 compatibility)

@user202729 user202729 changed the title Make bindings.py 2-3 compatible (fixes #47) Make bindings.py 2-3 compatible Sep 3, 2018
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