-
Notifications
You must be signed in to change notification settings - Fork 952
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
Replaced .iteritems() with six.iteritems() for Python 2 and 3 compat #274
Conversation
As an addendum, I've noticed the usage of |
@igormp Thank you for the contribution. But isn't |
It is indeed, but might be way slower in Python 2 (at least according to this). |
For now we support both python 2 and 3. Perhaps that will be changed in the future. Dropping python 2 is discussed (as you already know) in #194.
Only format the lines you actually change. Formatting lines written by others messes up the git line history which can come in handy if you want to figure out why things are made in a particular way.
As I see it there are 3 options: In short: I suggest we replace all occurances of |
This is an (active) duplicate of #123. |
Ok, redid it. I can squash the commits after someone reviews the new changes. I also think that it's a good idea to rename the PR since we're going to keep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is looking good, it is a clear improvement and makes our code more consistent. I do not have any comments.
This is a squashed commit, the previous messages can be seen bellow This is the 1st commit message: Replaced .iteritems() usage for .items() Fixed some python 2 leftovers, as discussed in #267. Also formatted code according to Black.\nThis possibly breaks some python 2 compatibility This is the commit message #2: Reverted formatting and more spread six usage
Squashed the commits and changed the title, everything is good to go. |
Fixed some python 2 leftovers, as discussed in #267.
Also formatted code according to Black, I hope that's not a problem.
This possibly breaks some python 2 compatibility.