gh-146061: Fix contradicting sentences in json docs#146095
Open
jonathandung wants to merge 9 commits intopython:mainfrom
Open
gh-146061: Fix contradicting sentences in json docs#146095jonathandung wants to merge 9 commits intopython:mainfrom
jonathandung wants to merge 9 commits intopython:mainfrom
Conversation
eendebakpt
reviewed
Mar 18, 2026
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Doc/library/json.rst
Outdated
| If zero, negative, or ``""`` (the empty string), | ||
| only newlines are inserted. | ||
| If ``None`` (the default), the most compact representation is used. | ||
| If ``None`` (the default), no pretty printing is done, and a |
Member
There was a problem hiding this comment.
Why not simply say that no pretty-pritting is used or that no newlines are inserted?
Author
There was a problem hiding this comment.
That's wrong. The default behaviour is that spaces are inserted after the comma and colon separators, but newlines are not inserted, and I don't think the spaces count as pretty printing.
Author
|
PR edited. See @serhiy-storchaka's comment. |
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
eendebakpt
approved these changes
Mar 19, 2026
| object members will be pretty-printed with that indent level. An indent | ||
| level of 0 will only insert newlines. ``None`` is the most compact | ||
| representation. | ||
| level of 0 will only insert newlines. ``None`` gives a compact |
Member
There was a problem hiding this comment.
If ``indent`` is ``None`` (the default), no newlines are inserted.
Member
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Also update the docstring for dumps().
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.
Closes #146061.
Changed the description under the
indentparameter tojson.dump, such that it no longer opposes that underseparators.📚 Documentation preview 📚: https://cpython-previews--146095.org.readthedocs.build/