-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
gh-99087: Add missing newline for prompts in docs #98993
Conversation
This is against the recommendations by the dev guide: https://devguide.python.org/documentation/style-guide/#code-examples Suggesting to close this PR. |
I would argue that it does aid copy-pasting and is necessary despite impeding some readability: for example, in the enum howto, we have this: which (when the
but this causes a error when pasted:
This happens if the previous line is a part of something function, class, etc. when there's indentation, so the new line's needed to clear it out. I should have also put my justification in the description instead of leaving it empty - my bad on that. |
I think the devguide paragraph @erlend-aasland cites isn't exactly on point here. It's about not introducing the secondary prompt to examples that currently don't have it, but this PR adds an extra line of secondary prompt to examples that already have it. |
Yeah, either that, or creating an issue describing the problem. Perhaps an issue would have been appropriate here, since it is clearly not a trivial change. |
The problem here is that the edit looks gross and makes the examples slightly longer, noisier, and less readable without adding anything substantive. |
Preventing errors from copy-pasting prompts, especially from howto pages, would quality as substantive to me, and since the edit is just extending the existing |
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.
I think this change is helpful, though I must admit I'd never even noticed the button to remove the prompts from code samples. I won't merge it though until there's consensus on the issue.
I agree, it makes sense to me. I also think we should amend the dev guide. |
FTR; the sqlite3 change is no longer relevant. |
✅ Deploy Preview for python-cpython-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
#99087