]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-34712: Fix style in examples in "Input and Output" (GH-9361)
authorBen Hoyt <benhoyt@gmail.com>
Wed, 19 Sep 2018 10:28:28 +0000 (06:28 -0400)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 19 Sep 2018 10:28:28 +0000 (03:28 -0700)
commit3705b9862025705ea60041a9e310f99a164db722
tree260d8e8bda94be7a27277f1114fed01777d66143
parente89de7398718f6e68848b6340830aeb90b7d582c
bpo-34712: Fix style in examples in "Input and Output" (GH-9361)

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.html#format-string-syntax

https://bugs.python.org/issue34712
Doc/tutorial/inputoutput.rst