Serhiy Storchaka
1e47fbcf78
[3.7] bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174). (GH-11232)
...
(cherry picked from commit 2b57c43f21 )
2018-12-19 09:28:12 +02:00
Miss Islington (bot)
d9c89111bd
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.htmlGH-format-string-syntax
https://bugs.python.org/issue34712
(cherry picked from commit 3705b98620 )
Co-authored-by: Ben Hoyt <benhoyt@gmail.com >
2018-09-19 13:30:40 -07:00
Miss Islington (bot)
854b740910
Doc: Missing 'f' in an f-string. (GH-9074) (GH-9095)
...
(cherry picked from commit 25fa141487 )
Co-authored-by: Julien Palard <julien@palard.fr >
2018-09-07 11:59:00 +02:00
Miss Islington (bot)
49abd307d2
bpo-34161: Remove extra parentheses in output formatting tutorial (GH-8350)
...
The parentheses were incorrect.
(cherry picked from commit cb5f3fdb9d )
Co-authored-by: Aaqa Ishtyaq <aaqaishtyaq@gmail.com >
2018-07-20 13:38:06 -07:00
Miss Islington (bot)
c87b1aabbd
Fix documentation for input and output tutorial (GH-8231)
...
The ValueError message ends with a period.
(cherry picked from commit 9cffdbffc3 )
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com >
2018-07-10 17:51:03 -07:00
Miss Islington (bot)
80a5f04592
bpo-28626: rearrange discussion of output formatting to encourage f-strings (GH-6036)
...
The 'output formatting' section of the tutorial talks a lot about manual formatting with things like .rjust() and .zfill(), with only a passing reference to 3.6's new f-strings.
This doesn't drop all of the old material, but it does rearrange the topics into a more modern order: f-strings first, discussing formatting specifiers a bit; then calling .format(); finally manual formatting with .ljust().
(cherry picked from commit ced350b195 )
Co-authored-by: Andrew Kuchling <amk@amk.ca >
2018-07-09 06:52:48 -07:00
Miss Islington (bot)
ddf2485103
bpo-25059: Clarify the print separator usage in tutorial (GH-5879)
...
By default `print` adds spaces between its arguments.
(cherry picked from commit 84c4b0cc67 )
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com >
2018-02-25 11:13:33 -08:00
Andrew Kuchling
bd4e9e0ca9
bpo-6519: Improve Python Input Output Tutorial (GH-2143)
...
Move up the discussion about 'with' keyword, so it appears earlier in the document.
2017-06-12 22:31:01 -07:00
suketa
1dbce04d0e
bpo-30621: Update Input Output Tutorial Example(GH-2074)
...
import json before using json module
2017-06-11 18:42:59 -07:00
UltimateCoder
8856940cf2
bpo-28315: Improve code examples in docs (GH-1372)
...
Replace
File "<stdin>", line 1, in ?
with
File "<stdin>", line 1, in <module>
2017-05-03 09:46:45 -07:00
Serhiy Storchaka
c499f30286
Issue #23921 : Standardized documentation whitespace formatting.
...
Original patch by James Edwards.
2016-05-10 12:01:56 +03:00
Serhiy Storchaka
dba903993a
Issue #23921 : Standardized documentation whitespace formatting.
...
Original patch by James Edwards.
2016-05-10 12:01:23 +03:00
Georg Brandl
2d43bc2fc2
merge with 3.5
2016-02-22 14:53:03 +01:00
Georg Brandl
f1d371bde9
Update example; str(float) changed so there is difference now.
2016-02-22 14:52:55 +01:00
Martin Panter
bc1ee460dc
Issue #25179 : Documentation for formatted string literals aka f-strings
...
Some of the inspiration and wording is taken from the text of PEP 498 by Eric
V. Smith, and the existing str.format() documentation.
2016-02-13 00:41:37 +00:00
Ezio Melotti
397bb2486a
#26001 : mention in the tutorial that files in binary mode expect bytes, not str.
2016-01-12 11:27:30 +02:00
Jason R. Coombs
842c07414e
Issue #24729 : Correct reference to open function.
2015-07-29 14:04:36 -04:00
Alessandro Cucci
d8de44b6b3
Issue #24729 : Update tutorial to match implementation.
2015-07-28 21:00:10 +02:00
Georg Brandl
6b4c847c4f
Doc: fix default role usage (except in unittest mock docs)
2014-10-30 22:26:26 +01:00
Antoine Pitrou
dd799d2e32
Issue #18840 : Introduce the json module in the tutorial, and deemphasize the pickle module.
2013-12-05 23:46:32 +01:00
R David Murray
1c4e443ea2
#16273 : Fix tutorial discussion of seek/tell (opaque text-mode values).
...
Patch by Sijin Joseph.
2013-07-30 15:51:57 -04:00
Raymond Hettinger
c1939b8f75
Issue #18031 : %-formatting isn't dead yet and might pull through.
2013-05-23 00:14:47 -07:00
Ezio Melotti
ed3cd7e445
#13510 : clarify that f.readlines() is note necessary to iterate over a file. Patch by Dan Riti.
2013-04-15 19:08:31 +03:00
Petri Lehtinen
9f74c6cf7d
Issue #8890 : Stop advertising an insecure use of /tmp in docs
2013-02-23 19:27:49 +01:00
Chris Jerdonek
5bf7f1f6e3
Clarify universal-newline wording in tutorial (issue #16266 ).
2012-10-17 20:17:41 -07:00