summaryrefslogtreecommitdiff
path: root/Doc/tutorial
Commit message (Collapse)AuthorAgeFilesLines
* bpo-34712: Fix style in examples in "Input and Output" (GH-9361)Miss Islington (bot)2018-09-191-4/+7
| | | | | | | | | | | | 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>
* bpo-33460: remove ellipsis that look like continuation prompts (GH-7851)Miss Islington (bot)2018-09-101-4/+10
| | | | | | | 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>
* Doc: Missing 'f' in an f-string. (GH-9074) (GH-9095)Miss Islington (bot)2018-09-071-1/+1
| | | | | (cherry picked from commit 25fa141487e61b94f15289619cb3af764cf65e58) Co-authored-by: Julien Palard <julien@palard.fr>
* Update list.remove(x) documentation (GH-8636)Miss Islington (bot)2018-08-021-2/+2
| | | | | | Rephrase it to "It raises a `ValueError`" (cherry picked from commit bcd1d971b66f529cbd450aca438275b868031605) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-28677: Improve phrasing of when instance attribute is referenced (GH-6208)Miss Islington (bot)2018-07-251-2/+2
| | | | | (cherry picked from commit c0f0a7669c73c0d444851dd4c5299de2479214cc) Co-authored-by: Aaron Ang <aaronang@users.noreply.github.com>
* bpo-34161: Remove extra parentheses in output formatting tutorial (GH-8350)Miss Islington (bot)2018-07-201-2/+2
| | | | | | The parentheses were incorrect. (cherry picked from commit cb5f3fdb9d353a572dd22fb50a110e52d5bb81b1) Co-authored-by: Aaqa Ishtyaq <aaqaishtyaq@gmail.com>
* Fix documentation for input and output tutorial (GH-8231)Miss Islington (bot)2018-07-101-1/+1
| | | | | | The ValueError message ends with a period. (cherry picked from commit 9cffdbffc3b2dec18def1c3e8cfa166d01d609df) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-28626: rearrange discussion of output formatting to encourage f-strings ↵Miss Islington (bot)2018-07-091-89/+138
| | | | | | | | | | (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>
* use rich markup for PEP reference (GH-7939)Miss Islington (bot)2018-06-261-1/+1
| | | | | | 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>
* bpo-33892: Doc: Use gender neutral words (GH-7770)Miss Islington (bot)2018-06-171-10/+10
| | | | | (cherry picked from commit 5092439c2cb32112a5869b138011d38491db90a9) Co-authored-by: Andrés Delfino <adelfino@gmail.com>
* bpo-33641: Convert RFC references into links. (GH-7103)Miss Islington (bot)2018-05-301-1/+1
| | | | | | 85% of them are already links. (cherry picked from commit 0a36ac1a09587735237c5978ebd046313922869c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-33503: Fix the broken pypi link in the source and the documentation ↵Miss Islington (bot)2018-05-162-2/+2
| | | | | | | (GH-6814) (GH-6872) (cherry picked from commit 19177fbd5d6d9b29ccc302d65f9d9417ece082ce) Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
* bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738)Miss Islington (bot)2018-05-091-2/+2
| | | | | (cherry picked from commit ddb6215a55b0218b621d5cb755e9dfac8dab231a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Mention both relevant PEPs in function annotations tutorial (GH-6304)Miss Islington (bot)2018-04-251-2/+2
| | | | | | Patch by Neeraj Badlani. (cherry picked from commit 643ff711faf417fc3428897dc7d36250ad2cb0e5) Co-authored-by: Neeraj Badlani <neerajbadlani@gmail.com>
* bpo-33297: Mention Pillow to work with more image formats. (GH-6505)Miss Islington (bot)2018-04-211-1/+1
| | | | | | Also update PIL doc references to Pillow. (cherry picked from commit b81ca28b378c8b29204a37f8bd433a3379f53f7d) Co-authored-by: Andrés Delfino <34587441+andresdelfino@users.noreply.github.com>
* Improve highlighting of some code blocks. (GH-6401)Miss Islington (bot)2018-04-091-1/+1
| | | | | (cherry picked from commit 46936d5a71d1683dbd8ddb6d7f39aab50ecfec50) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-32337: Update documentats about dict order (GH-4973)Miss Islington (bot)2018-04-031-15/+11
| | | | | (cherry picked from commit dfbbbf16f9aab82330c634913441b5ac73267d9c) Co-authored-by: hui shang <shangdahao@gmail.com>
* controlflow: Use full example for "5 through 9" (GH-5907)Miss Islington (bot)2018-03-101-1/+1
| | | | | | | 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>
* bpo-31454: Include information about "import X as Y" in Modules tutorial ↵Miss Islington (bot)2018-02-251-0/+19
| | | | | | | (GH-4041) (cherry picked from commit fbee88244e8921afdb29fde51a9a010a8ae18277) Co-authored-by: Mario Corchero <mariocj89@gmail.com>
* bpo-25059: Clarify the print separator usage in tutorial (GH-5879)Miss Islington (bot)2018-02-251-1/+1
| | | | | | By default `print` adds spaces between its arguments. (cherry picked from commit 84c4b0cc67ceb4b70842b78c718b6e8214874d6a) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
* bpo-32452: clarify term 'brackets' in generator tutorial (#5079)Emily Morehouse2018-01-011-3/+3
| | | 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)
* bpo-25910: Fixes redirection from http to https (#4674)Sanyam Khurana2017-12-061-1/+1
|
* Improve the String tutorial docs (GH-4541)Will White2017-11-241-7/+7
| | | | | 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.
* bpo-31757: Make Fibonacci examples consistent (#3991)Raymond Hettinger2017-10-142-18/+20
|
* bpo-30466: Add brief explanation of classes to tutorial (GH-1804)Trey Hunner2017-07-121-0/+6
|
* Clarification to the `break` statement (GH-2453)regexaurus2017-06-271-1/+1
| | | Clarify that the break statement breaks out of the innermost enclosing for or while loop.
* bpo-6519: Improve Python Input Output Tutorial (GH-2143)Andrew Kuchling2017-06-121-21/+29
| | | Move up the discussion about 'with' keyword, so it appears earlier in the document.
* bpo-30621: Update Input Output Tutorial Example(GH-2074)suketa2017-06-111-0/+1
| | | import json before using json module
* bpo-30312: Small correction in datastructures set code sample (GH-2081)KatherineMichel2017-06-101-1/+1
|
* bpo-30361: Use better example for mixed-type operands (#1701)gfyoung2017-05-291-4/+2
|
* bpo-28315: Improve code examples in docs (GH-1372)UltimateCoder2017-05-034-4/+4
| | | | | | Replace File "<stdin>", line 1, in ? with File "<stdin>", line 1, in <module>
* bpo-29756: Improve documentation for list methods that compare items by ↵Xiang Zhang2017-03-131-2/+2
| | | | | | equality (GH-572)
* Fix small typos in introduction and datastructures of tutorial (GH-272)Jim Fasarakis-Hilliard2017-02-252-5/+5
| | | | | * Fix small typos in introduction and datastructures * Use iterable instead of L in the doc for list.extend
* bpo-29453: Remove reference to undefined dictionary ordering in Tutorial ↵Jim Fasarakis-Hilliard2017-02-201-6/+5
| | | | | | | | | (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
* Issue #29381: merge with 3.6Mariatta Wijaya2017-02-011-11/+10
|\
| * Issue #29381: Clarify ordering of UNIX shebang line as source encoding lineMariatta Wijaya2017-02-011-11/+10
| |
| * Backed out changeset 3d712292f2faMariatta Wijaya2017-02-011-14/+15
| |
| * Issue #29381: Clarify ordering of UNIX shebang line as source encoding lineMariatta Wijaya2017-02-011-15/+14
| |
* | Merge: #29005: clarify terminology in tutorial 'method' discussion.R David Murray2016-12-181-3/+2
|\ \ | |/
| * Merge: #29005: clarify terminology in tutorial 'method' discussion.R David Murray2016-12-181-3/+2
| |\
| | * #29005: clarify terminology in tutorial 'method' discussion.R David Murray2016-12-181-3/+2
| | | | | | | | | | | | Patch by Jim Fasarakis-Hilliard.
* | | Issue #28820: Merge typo fixes from 3.6Martin Panter2016-12-101-1/+1
|\ \ \ | |/ /
| * | Issue #28820: Merge spelling fixes from 3.5Martin Panter2016-12-101-1/+1
| |\ \ | | |/
| | * Issue #28820: Fix spelling of “practice” as a nounMartin Panter2016-12-101-1/+1
| | |
* | | Fixed mismatching title overline.Serhiy Storchaka2016-12-041-1/+1
|\ \ \ | |/ /
| * | Fixed mismatching title overline.Serhiy Storchaka2016-12-041-1/+1
| |\ \ | | |/
| | * Fixed mismatching title overline.Serhiy Storchaka2016-12-041-1/+1
| | |
* | | Fixed double hyphens that are rendered to literal en-dashes in the documenation.Serhiy Storchaka2016-12-041-2/+2
|\ \ \ | |/ /
| * | Fixed double hyphens that are rendered to literal en-dashes in the documenation.Serhiy Storchaka2016-12-041-2/+2
| |\ \ | | |/
| | * Fixed double hyphens that are rendered to literal en-dashes in the documenation.Serhiy Storchaka2016-12-041-2/+2
| | |