| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
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 3705b9862025705ea60041a9e310f99a164db722)
Co-authored-by: Ben Hoyt <benhoyt@gmail.com>
|
|
|
|
|
|
|
| |
Remove ellipsis that look like continuation prompts,
has a side benefit of putting rest of error message in proper text color.
(cherry picked from commit f019579828ed62653e2d41c95278308fa076ccaf)
Co-authored-by: Lew Kurtz <37632626+lew18@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 25fa141487e61b94f15289619cb3af764cf65e58)
Co-authored-by: Julien Palard <julien@palard.fr>
|
|
|
|
|
|
| |
Rephrase it to "It raises a `ValueError`"
(cherry picked from commit bcd1d971b66f529cbd450aca438275b868031605)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit c0f0a7669c73c0d444851dd4c5299de2479214cc)
Co-authored-by: Aaron Ang <aaronang@users.noreply.github.com>
|
|
|
|
|
|
| |
The parentheses were incorrect.
(cherry picked from commit cb5f3fdb9d353a572dd22fb50a110e52d5bb81b1)
Co-authored-by: Aaqa Ishtyaq <aaqaishtyaq@gmail.com>
|
|
|
|
|
|
| |
The ValueError message ends with a period.
(cherry picked from commit 9cffdbffc3b2dec18def1c3e8cfa166d01d609df)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(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 ced350b1952857a9b9c68ec7e2786358bcb61050)
Co-authored-by: Andrew Kuchling <amk@amk.ca>
|
|
|
|
|
|
| |
it's better to refer to PEP with `pep` role in reStructuredText. It also links to the PEP page.
(cherry picked from commit df748c20dabcec5a6e89e0dd74fff21110f8755a)
Co-authored-by: Behzad B. Mokhtari <35877268+perplexionist@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 5092439c2cb32112a5869b138011d38491db90a9)
Co-authored-by: Andrés Delfino <adelfino@gmail.com>
|
|
|
|
|
|
| |
85% of them are already links.
(cherry picked from commit 0a36ac1a09587735237c5978ebd046313922869c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
(GH-6814) (GH-6872)
(cherry picked from commit 19177fbd5d6d9b29ccc302d65f9d9417ece082ce)
Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
|
|
|
|
|
| |
(cherry picked from commit ddb6215a55b0218b621d5cb755e9dfac8dab231a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
Patch by Neeraj Badlani.
(cherry picked from commit 643ff711faf417fc3428897dc7d36250ad2cb0e5)
Co-authored-by: Neeraj Badlani <neerajbadlani@gmail.com>
|
|
|
|
|
|
| |
Also update PIL doc references to Pillow.
(cherry picked from commit b81ca28b378c8b29204a37f8bd433a3379f53f7d)
Co-authored-by: Andrés Delfino <34587441+andresdelfino@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 46936d5a71d1683dbd8ddb6d7f39aab50ecfec50)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit dfbbbf16f9aab82330c634913441b5ac73267d9c)
Co-authored-by: hui shang <shangdahao@gmail.com>
|
|
|
|
|
|
|
| |
Replace example result of "5 through 9" with complete list: "5, 6, 7, 8, 9".
This format is more consistent with the surrounding examples.
(cherry picked from commit 83d7062d2dc5eacfef578e072bca4747c346fdae)
Co-authored-by: Steven M. Vascellaro <S.Vascellaro@gmail.com>
|
|
|
|
|
|
|
| |
(GH-4041)
(cherry picked from commit fbee88244e8921afdb29fde51a9a010a8ae18277)
Co-authored-by: Mario Corchero <mariocj89@gmail.com>
|
|
|
|
|
|
| |
By default `print` adds spaces between its arguments.
(cherry picked from commit 84c4b0cc67ceb4b70842b78c718b6e8214874d6a)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
|
|
|
| |
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)
|
| |
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
| |
Clarify that the break statement breaks out of the innermost enclosing for or while loop.
|
|
|
| |
Move up the discussion about 'with' keyword, so it appears earlier in the document.
|
|
|
| |
import json before using json module
|
| |
|
| |
|
|
|
|
|
|
| |
Replace
File "<stdin>", line 1, in ?
with
File "<stdin>", line 1, in <module>
|
|
|
|
|
|
| |
equality (GH-572)
|
|
|
|
|
| |
* Fix small typos in introduction and datastructures
* Use iterable instead of L in the doc for list.extend
|
|
|
|
|
|
|
|
|
| |
(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
|
|\ |
|
| | |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| |\ |
|
| | |
| | |
| | |
| | | |
Patch by Jim Fasarakis-Hilliard.
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|