GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — gh-115986: Use param list to mark up pprint.PrettyPrinter constructor by erlend-aasland · Pull Request #116085 · python/cpython Conversation
|
|
cc. @Privat33r-dev |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Side note:
Just noticed 2 documentation above mentions, which is inaccurate after we moved class to the bottom. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| :param bool sort_dicts: | ||
| If ``True`` (the default), dictionaries will be formatted with | ||
| their keys sorted, otherwise they will display in insertion order. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Maybe a passive tense would be more accurate choice? will be displayed. Though I am not sure.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Good catch. Can you please open a PR to fix that? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think the fundamental problem with this module's docs is that they've been written by somebody thinking about it from the perspective of how the module is implemented, rather than from the perspective of how users generally use it. From the perspective of the implementation, it makes sense to document the meaning of all these parameters as part of the PrettyPrinter class, since all the module-level functions are just abstractions over that class. But from the perspective of the user, I'm not sure that really makes sense — users of this module rarely need to use the low-level class.
So maybe the meaning of these parameters should be documented in a separate table somewhere in these docs, rather than as part of the documentation of this class — we could just say the parameters have the same meaning for all functions in the module
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Is there an example of this style? I would definitely agree that we should make params for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
I'm imagining a table that looks a bit like https://docs.python.org/3/library/typing.html#id7 (source code at cpython/Doc/library/typing.rst Line 2736 in 86e5e06
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I agree, @AlexWaygood. We ran into similar problems in the ftplib docs. Perhaps we should consider this approach over there as well. I'll close this PR for now. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I wish there was a more modern design for the table though. I am not sure where I can post proposal for it, but it would be nice if instead of this: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@Privat33r-dev, I'd try and ask in the Documentation category on Discourse, or on our Python Docs Discord server. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.