Skip to content

gh-146061: Fix contradicting sentences in json docs#146095

Open
jonathandung wants to merge 9 commits intopython:mainfrom
jonathandung:main
Open

gh-146061: Fix contradicting sentences in json docs#146095
jonathandung wants to merge 9 commits intopython:mainfrom
jonathandung:main

Conversation

@jonathandung
Copy link

@jonathandung jonathandung commented Mar 17, 2026

Closes #146061.

Changed the description under the indent parameter to json.dump, such that it no longer opposes that under separators.


📚 Documentation preview 📚: https://cpython-previews--146095.org.readthedocs.build/

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news labels Mar 17, 2026
@python-cla-bot
Copy link

python-cla-bot bot commented Mar 17, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Mar 17, 2026
@picnixz picnixz changed the title gh-146061: Fix contradicting sentences in [json docs](https://github.com/python/cpython/blob/main/Doc/library/json.rst) gh-146061: Fix contradicting sentences in json docs Mar 18, 2026
jonathandung and others added 2 commits March 18, 2026 20:12
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not simply say that no pretty-pritting is used or that no newlines are inserted?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jonathandung
Copy link
Author

PR edited. See @serhiy-storchaka's comment.

jonathandung and others added 2 commits March 19, 2026 16:37
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Contradictory sentences in json docs

3 participants