Skip to content

Make bindings.py 2-3 compatible#56

Open
user202729 wants to merge 1 commit intofay59:masterfrom
user202729:master
Open

Make bindings.py 2-3 compatible#56
user202729 wants to merge 1 commit intofay59:masterfrom
user202729:master

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