-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
Documentation
The documentation for the pprint module could be improved in many respects:
- Most users will probably only ever need to use
pprint.pp()orpprint.pprint(), but these are buried halfway down the module. It would be nice if these were the first things on the page. - All examples in the documentation use
pprint.pprint(), which has some unexpected behaviour. For example, it sorts dictionaries by default, which is somewhat unintuitive now that dictionaries maintain insertion order. I suggest we change the examples to usepprint.pp()instead, which has the more intuitive default ofsort_dicts=False. - Similarly, the docs for
pprint.pprint()could explicitly call out that it has unintuitive defaults for things such assort_dictsand link topprint.pp() - Some links in the module's documentation incorrectly point to the module itself (
pprint) instead of the functionpprint.pprint().
These don't all necessarily need to be tackled in the same PR
Linked PRs
- GH-115986 Fix
pprintdocumentation #116019 - [3.12] GH-115986 Reorder pprint docs and amend some references (GH-116019) #116061
- [3.11] GH-115986 Reorder pprint docs and amend some references (#116019) #116064
- gh-115986: Use param list to mark up pprint.PrettyPrinter constructor #116085
- gh-115986: Fix inaccuracies in pprint docs #116104
- [3.12] gh-115986: Fix inaccuracies in pprint docs (GH-116104) #116382
- [3.11] gh-115986: Fix inaccuracies in pprint docs (GH-116104) #116383
- GH-115986 Docs: promote pprint.pp usage as a default #116614
- [3.12] GH-115986 Docs: promote pprint.pp usage as a default (GH-116614) #117196
- [3.11] GH-115986 Docs: promote pprint.pp usage as a default (GH-116614) #117197
- gh-115986 Improve pprint docs formatting #117401
- gh-115986 Improve pprint documentation accuracy #117403
- [3.12] gh-115986 Improve pprint documentation accuracy (GH-117403) #118146
- [3.13] gh-115986 Improve pprint docs formatting (GH-117401) #121098
- [3.12] gh-115986 Improve pprint docs formatting (GH-117401) #121099
hugovk, Privat33r-dev, mattermat, erlend-aasland and mondejacben
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir