Ben Hoyt
3705b98620
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
7 years ago
Lew Kurtz
f019579828
bpo-33460: remove ellipsis that look like continuation prompts (GH-7851)
Remove ellipsis that look like continuation prompts,
has a side benefit of putting rest of error message in proper text color.
7 years ago
Julien Palard
25fa141487
Doc: Missing 'f' in an f-string. (GH-9074)
7 years ago
Lysandros Nikolaou
bcd1d971b6
Update list.remove(x) documentation (GH-8636)
Rephrase it to "It raises a `ValueError`"
8 years ago
Aaron Ang
c0f0a7669c
bpo-28677: Improve phrasing of when instance attribute is referenced (GH-6208)
8 years ago
Aaqa Ishtyaq
cb5f3fdb9d
Remove extra parentheses in output formatting tutorial (GH-8350)
The parentheses were incorrect.
8 years ago
Lysandros Nikolaou
9cffdbffc3
Fix documentation for input and output tutorial (GH-8231)
The ValueError message ends with a period.
8 years ago
Andrew Kuchling
ced350b195
bpo-28626: rearrange discussion of output formatting to encourage f-strings ( #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().
8 years ago
Behzad B. Mokhtari
df748c20da
use rich markup for PEP reference (GH-7939)
it's better to refer to PEP with `pep` role in reStructuredText. It also links to the PEP page.
8 years ago
Andrés Delfino
5092439c2c
bpo-33892: Doc: Use gender neutral words (GH-7770)
8 years ago
Serhiy Storchaka
0a36ac1a09
bpo-33641: Convert RFC references into links. (GH-7103)
85% of them are already links.
8 years ago
Stéphane Wirtel
19177fbd5d
bpo-33503: Fix the broken pypi link in the source and the documentation (GH-6814)
8 years ago
Serhiy Storchaka
ddb6215a55
bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738)
8 years ago
Neeraj Badlani
643ff711fa
Mention both relevant PEPs in function annotations tutorial (GH-6304)
Patch by Neeraj Badlani.
8 years ago
Andrés Delfino
b81ca28b37
bpo-33297: Mention Pillow to work with more image formats. ( #6505 )
Also update PIL doc references to Pillow.
8 years ago
Serhiy Storchaka
46936d5a71
Improve highlighting of some code blocks. (GH-6401)
8 years ago
hui shang
dfbbbf16f9
bpo-32337: Update documentats about dict order (GH-4973)
8 years ago
Steven M. Vascellaro
83d7062d2d
controlflow: Use full example for "5 through 9" (GH-5907)
Replace example result of "5 through 9" with complete list: "5, 6, 7, 8, 9".
This format is more consistent with the surrounding examples.
8 years ago
Mario Corchero
fbee88244e
bpo-31454: Include information about "import X as Y" in Modules tutorial (GH-4041)
8 years ago
Cheryl Sabella
84c4b0cc67
bpo-25059: Clarify the print separator usage in tutorial (GH-5879)
By default `print` adds spaces between its arguments.
8 years ago
Stéphane Wirtel
ab328756d7
bpo-32722: Remove useless example in the Classes tutorial ( #5446 )
In the tutorial about the Generator expression, there is an example with
a dict comprehension and not with a generator expression, just removed
the code.
8 years ago
Ned Deily
5489bdad51
Start of 3.8.0a0
8 years ago
Emily Morehouse
f190eb59e6
bpo-32452: clarify term 'brackets' in generator tutorial ( #5079 )
Updates documentation for generator expressions in classes tutorial: Clarify usage of ambiguous term "brackets" by replacing with "square brackets". Updated subsequent lines to respect line breaks. (#5079 )
8 years ago
Sanyam Khurana
1b4587a246
bpo-25910: Fixes redirection from http to https ( #4674 )
8 years ago
Will White
78a5722ae9
Improve the String tutorial docs (GH-4541)
The paragraph that contains example of string literal concatenation was placed
after the section about concatenation using the '+' sign.
Moved the paragraph to the appropriate section.
8 years ago
Raymond Hettinger
8c26a34f93
bpo-31757: Make Fibonacci examples consistent ( #3991 )
8 years ago
Trey Hunner
3fbd70018f
bpo-30466: Add brief explanation of classes to tutorial (GH-1804)
9 years ago
regexaurus
36fc896740
Clarification to the `break` statement (GH-2453)
Clarify that the break statement breaks out of the innermost enclosing for or while loop.
9 years ago
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.
9 years ago
suketa
1dbce04d0e
bpo-30621: Update Input Output Tutorial Example(GH-2074)
import json before using json module
9 years ago
KatherineMichel
ca81615344
bpo-30312: Small correction in datastructures set code sample (GH-2081)
9 years ago
gfyoung
e405d4b8df
bpo-30361: Use better example for mixed-type operands ( #1701 )
9 years ago
UltimateCoder
8856940cf2
bpo-28315: Improve code examples in docs (GH-1372)
Replace
File "<stdin>", line 1, in ?
with
File "<stdin>", line 1, in <module>
9 years ago
Xiang Zhang
b2d77175d1
bpo-29756: Improve documentation for list methods that compare items by equality (GH-572)
9 years ago
Jim Fasarakis-Hilliard
53c1892dc3
Fix small typos in introduction and datastructures of tutorial (GH-272)
* Fix small typos in introduction and datastructures
* Use iterable instead of L in the doc for list.extend
9 years ago
Jim Fasarakis-Hilliard
32e8f9bdfd
bpo-29453: Remove reference to undefined dictionary ordering in Tutorial (GH-140)
As of Python 3.6 **kwargs are ordered, thus, remove the paragraph stating that
ordering is undefined and change snippet to remove the unecessary sorted call.
* Add sentence mentioning guaranteed output order of kwargs
9 years ago
Mariatta Wijaya
23dcccb75b
Issue #29381 : Clarify ordering of UNIX shebang line as source encoding line
9 years ago
Mariatta Wijaya
77bb0f4900
Backed out changeset 3d712292f2fa
9 years ago
Mariatta Wijaya
e2d8bc52c4
Issue #29381 : Clarify ordering of UNIX shebang line as source encoding line
9 years ago
R David Murray
4ec1590fbf
#29005 : clarify terminology in tutorial 'method' discussion.
Patch by Jim Fasarakis-Hilliard.
9 years ago
Martin Panter
898573a734
Issue #28820 : Fix spelling of “practice” as a noun
9 years ago
Serhiy Storchaka
7bc01c32b1
Fixed mismatching title overline.
9 years ago
Serhiy Storchaka
29b0a26822
Fixed double hyphens that are rendered to literal en-dashes in the documenation.
9 years ago
Raymond Hettinger
8c5e190d36
Issue #28587 : Improve list examples in the tutorial
9 years ago
Raymond Hettinger
5bd5b9d813
Issue 28587: list.index documentation missing start and stop arguments. (Contributed by Mariatta Wijaya.)
9 years ago
Kushal Das
ecbca357c9
Closes #28713 uses OSError in the tutorial
9 years ago
Berker Peksag
cea632ece5
Issue #21864 : Remove outdated section about exceptions from the tutorial
Move the still relevant parts of it to the previous
chapter, "Errors and Exceptions".
9 years ago
Terry Jan Reedy
30eee4deec
Issue #28815 : Change '?' to '<module>' in some doc examples.
Patch by Mariatta Wijaya.
9 years ago
Berker Peksag
cf79cdb79d
Issue #28306 : Update exception message of ZeroDivisionError
9 years ago
Ned Deily
4829bc6619
Bump to 3.7.0a0
9 years ago