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.
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
bpo-30670: Add pp function to the pprint module #11769
bpo-30670: Add pp function to the pprint module #11769
Changes from all commits
30152b8
c75298b
e7242c0
52f6ed3
9a7aaed
bb2c055
765a9f9
3f30a20
c286cec
fbae1d0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Would it be worth explicitely saying that this is an alias of pprint() with
sort_dict=False
?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.
There is already a mention of
*args
and**kwargs
being passed topprint
andsort_dicts=False
is in the signature ofpp
so I don't think it is necessary.I would like to also like to avoid giving to much details about
pp
implementation because we may change some things if another data structure of Python changes like dicts did.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.
(if we were to do change what this function does, we would also change the doc, but I'm good with that.)
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.
At first glance I was puzzled why both
pp()
andpprint()
existed, and it took a moment to spot the different defaultsort_dict
value - and I ended up having to confirm via source code inspection that there were no other differences between the two.As such, the above mentioned docs would have been useful for me personally :-)