Repository navigation
MNT: Minor cleanups in the pdf backend and related files - #4603
Merged
Merged
Conversation
The sole non-ASCII character (in a docstring) had already been converted to UTF-8 by an earlier commit.
- replace the single use of six.moves.map with a list comprehension - io.BytesIO is included in all versions of Python we support - the set type is a builtin in all versions of Python we support
Probably too annoying even for debug-annoying
Probably more readable.
Member
There was a problem hiding this comment.
According to https://pythonhosted.org/six/ six.BytesIO is StringIO.StringIO in Python 2 not io.BytesIO does that make any difference?
Member
Author
There was a problem hiding this comment.
I think the io.BytesIO version is closer to the corresponding code in Python 3, and six uses StringIO probably because BytesIO was only introduced in 2.6. For example, BytesIO has a readinto method that StringIO lacks.
Member
There was a problem hiding this comment.
After some googling I think you are right.
Member
|
One inline comment. The rest is definite improvements IMHO 👍 |
tacaswell
added a commit
that referenced
this pull request
Jul 8, 2015
MNT: Minor cleanups in the pdf backend and related files
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.
No description provided.