Skip to content

[3.7] bpo-34712: Fix style in examples in "Input and Output" (GH-9361) #9414

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

Merged
merged 1 commit into from
Sep 19, 2018

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Sep 19, 2018

A couple of fixes here to make this more PEP-8:

  • Avoid multiple statements on one line with ; statement separator -- this is very rare in Python and is "generally discouraged" in PEP 8 (and if used, per PEP 8 there shouldn't be a space before the ;)
  • Add output for the first "Formatted String Literals" example. (Side note: are the doctests for this being run? If so, why didn't it fail?)
  • Avoid space before !r. I have generally not seen spaces before the !, and this also matches the style used in the docs here: https://docs.python.org/3/library/string.htmlGH-format-string-syntax

https://bugs.python.org/issue34712
(cherry picked from commit 3705b98)

Co-authored-by: Ben Hoyt [email protected]

https://bugs.python.org/issue34712

A couple of fixes here to make this more PEP-8:

* Avoid multiple statements on one line with `;` statement separator -- this is very rare in Python and is "generally discouraged" in PEP 8 (and if used, per PEP 8 there shouldn't be a space before the `;`)
* Add output for the first "Formatted String Literals" example. (Side note: are the doctests for this being run? If so, why didn't it fail?)
* Avoid space before `!r`. I have generally not seen spaces before the `!`, and this also matches the style used in the docs here: https://docs.python.org/3/library/string.htmlGH-format-string-syntax

https://bugs.python.org/issue34712
(cherry picked from commit 3705b98)

Co-authored-by: Ben Hoyt <[email protected]>
@miss-islington
Copy link
Contributor Author

@benhoyt: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit d9c8911 into python:3.7 Sep 19, 2018
@miss-islington miss-islington deleted the backport-3705b98-3.7 branch September 19, 2018 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants