changed dict.iteritems() to dict.items() (for making it Py3 compatible) - #158
Closed
pratik0316 wants to merge 1 commit into
Closed
changed dict.iteritems() to dict.items() (for making it Py3 compatible)#158pratik0316 wants to merge 1 commit into
pratik0316 wants to merge 1 commit into
Conversation
Signed-off-by: Pratikrocks <pratikrocks.dey11@gmail.com>
pratik0316
force-pushed
the
changing_Some_Functions_For_Py3
branch
from
April 14, 2020 20:59
26053e0 to
cb6b525
Compare
Collaborator
Author
|
@MaJuRG , some errors are faced when we don not have these changes and configuring with Py3 |
Contributor
|
#162 merged, which has this fix. Thanks! |
Collaborator
Author
|
okay :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR I changed
.iteritems()to.items()and changed the the file opening mode towinstead ofwbincli.py.I did this changes because
1.Python3 removed the
dict.iteritems()todict.items()references2.I made the 2nd change i.e. changed the file mode from
wbtowas because in Py 3, withwbfile mode the only serializable objects can be written , but actually we are writingstrobjects, Now this changed could also be done , by changing everystrobjects tobytes stream, which would be a lot more messy.So I changed the opening file mode towwhich can takestrobjects forwriteoperation.The references I took for this is a Medium blog: link