summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
Commit message (Collapse)AuthorAgeFilesLines
* [3.14] gh-132661: Document t-strings and `templatelib` (GH-135229) (#136974)Miss Islington (bot)2025-07-221-4/+5
| | | | | | | | | Co-authored-by: Dave Peck <davepeck@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Loïc Simon <loic.pano@gmail.com> Co-authored-by: pauleveritt <pauleveritt@me.com> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* [3.14] Pedantic rewording of why relative importing doesn't work in main ↵Miss Islington (bot)2025-07-211-2/+2
| | | | | | | | | | modules (GH-136846) (#136940) Pedantic rewording of why relative importing doesn't work in main modules (GH-136846) Pedantically reword the section about relative imports and main modules. (cherry picked from commit 4b68289ca6954b8d135e2ee2344e67fae38239fd) Co-authored-by: Josh Cannon <joshdcannon@gmail.com>
* [3.14] Update tutorial for new "Copy" button (GH-135007) (#135270)Miss Islington (bot)2025-06-081-4/+3
| | | | | Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* [3.14] feat(docs): type fix - apply pep8 by using docstring instead of ↵Miss Islington (bot)2025-06-061-2/+4
| | | | | | | | | | comment in the doc. (GH-135181) (#135212) feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. (GH-135181) Giving the right example incitates the tutorial readers to do the same in the future. (cherry picked from commit 343182853f19a42c0ba8980d3104076a8c7bcfe7) Co-authored-by: Jean-Louis GUENEGO <jlguenego@gmail.com>
* [3.14] Docs: Add note to tutorial clarifying scope (GH-134534) (#134536)Miss Islington (bot)2025-05-221-1/+6
| | | | | | | | | | Docs: Add note to tutorial clarifying scope (GH-134534) * Add note to tutorial * Update formatting (cherry picked from commit 742d5b5c5d75eae44c66a43ebfa24a4f286ea8a1) Co-authored-by: Kattni <kattni@kattni.com>
* [3.14] fix indent in `controlflow.rst` docs (GH-134008) (#134184)Miss Islington (bot)2025-05-181-1/+1
| | | | | | fix indent in `controlflow.rst` docs (GH-134008) (cherry picked from commit 4ce91871a9077fcf8806d6fd79bdb32af9587306) Co-authored-by: Yongzi Li <1538321957@qq.com>
* [3.14] gh-133881: add forward reference to `list.sort()` in lambda ↵Miss Islington (bot)2025-05-171-1/+2
| | | | | | | | expression tutorial (GH-133910) (#134126) gh-133881: add forward reference to `list.sort()` in lambda expression tutorial (GH-133910) (cherry picked from commit c1c9ad1d5a62a591eb2f0f0d29f3fa02e0949f14) Co-authored-by: Oleg Burnaev <51371645+Shepard2154@users.noreply.github.com>
* [3.14] Doc: Allow translating a code block in the tutorial (GH-131353) (#133648)Miss Islington (bot)2025-05-081-0/+2
| | | | | | | | Doc: Allow translating a code block in the tutorial (GH-131353) (cherry picked from commit 3224b99872d8ed030181e5d009ea64e8672a68ee) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Co-authored-by: Chris Markiewicz <effigies@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-130080: implement PEP 765 (#130087)Irit Katriel2025-03-171-2/+6
|
* gh-116666: Add "token" glossary term (GH-130888)Petr Viktorin2025-03-172-9/+10
| | | | | | | | | Add glossary entry for `token`, and link to it. Avoid talking about tokens in the SyntaxError intro (errors.rst); at this point tokenization is too much of a technical detail. (Even to an advanced reader, the fact that a *single* token is highlighted isn't too relevant. Also, we don't need to guarantee that it's a single token.) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* GH-130153: Reword the wildcard matching part of the tutorial (GH-129954)Tshepang Mbambo2025-03-051-2/+3
|
* gh-122876: Fix "End of lines" typo (#125310)za2025-02-191-1/+1
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* Python Tutorial typo fix (#128077)shallow-beach2024-12-201-1/+1
|
* gh-101100: amend references starting with `!~` in gh-127054 (#127684)Yuki Kobayashi2024-12-061-5/+5
|
* gh-101100: Fix Sphinx warnings about list methods (#127054)Yuki Kobayashi2024-12-021-5/+5
|
* gh-127265: Remove single quotes from 'arrow's in tutorial/errors.rst (GH-127267)funkyrailroad2024-11-251-1/+1
|
* gh-85583: Add f-string index in tutorial/inputoutput.rst (GH-21681)amaajemyfren2024-10-301-0/+7
| | | | | | | | | | | | * bpo-41411 fstring index in tutorial/inputoutput To assist in searching for fstrings I have added an index * Add newline --------- Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* docs: restore an anchor to for/else (#126154)Ned Batchelder2024-10-301-0/+1
|
* Fix a typo in ``Doc/tutorial/errors.rst`` exception output (#126001)Bogdana Vereha2024-10-261-1/+1
|
* gh-125615: Fix grammar nit in tutorial's interactive interpreter appendix ↵Cornelius Roemer2024-10-161-1/+1
| | | | | (GH-125617) Replace "without ... nor" with "with neither ... nor"
* gh-125403: fix console formatting in Chapter 12 of the tutorial (#125404)partev2024-10-131-8/+8
|
* gh-125383: Update `fib` function comment for accuracy (#125386)Wulian2024-10-131-2/+2
| | | `Doc/tutorial/controlflow.rst`: fix comment for `fib` function
* Prefer "similar" over "equivalent" in tutorial (#125343)Stephen Rosen2024-10-121-4/+4
| | | | | | | | | | | In the datastructures tutorial doc, some operations are described as "equivalent to" others. This has led to some user-confusion -- at least in the Discourse forums -- about cases in which the operations differ. This change doesn't systematically eliminate the word "equivalent" from the tutorial. It just substitutes "similar to" in several cases in which "equivalent to" could mislead users into expecting exact equivalence.
* Doc: Fix a typo in "Function Examples" in the control-flow tutorial (#125338)Rafael Fontenelle2024-10-121-1/+1
|
* gh-101100: Consolidate documentation on `ModuleType` attributes (#124709)Alex Waygood2024-10-091-2/+3
| | | | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Barry Warsaw <barry@python.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* Docs: make a tutorial example more precise (#125066)Ned Batchelder2024-10-071-11/+9
| | | | | Based on discussion here: https://discuss.python.org/t/omission-in-the-documentation/66816
* Docs: for for/else clarify that return or raise also skip the else (#124591)Ned Batchelder2024-09-271-2/+4
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* For-else deserves its own section in the tutorial (#123946)Ned Batchelder2024-09-251-31/+54
| | | | | | | | | | | | | * For-else deserves its own section in the tutorial * remove mention of unrolling the loop * Update Doc/tutorial/controlflow.rst Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> --------- Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-101100: Add a table of class attributes to the "Custom classes" section ↵Alex Waygood2024-09-251-3/+3
| | | | of the data model docs (#124480)
* Update to 3.13 the output of exceptions raised (#123888)Rafael Fontenelle2024-09-131-3/+42
|
* gh-123492: Remove unnecessary `:func:` parentheses (#123493)Wei-Hsiang (Matt) Wang2024-08-301-1/+1
|
* GH-109975: Copyedit 3.13 What's New: New Features (#122990)Adam Turner2024-08-151-2/+2
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* gh-122944: Fix incorrect prompt strings in the Python Tutorial (#122949)Damien2024-08-124-10/+10
| | | | In the REPL, top level comments are followed by a primary, not secondary prompt. Fix the places in the in the tutorial that use the latter.
* gh-121905: Consistently use "floating-point" instead of "floating point" ↵Serhiy Storchaka2024-07-194-9/+9
| | | | (GH-121907)
* gh-120452: improve documentation about private name mangling (#120451)Bénédikt Tran2024-07-131-0/+5
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-120345: Fix incorrect use of the :class: role with the "()" suffix ↵Serhiy Storchaka2024-06-121-2/+2
| | | | | | | (GH-120347) * Remove "()" when refer to a class as a type. * Use :func: when refer to a callable. * Fix reference to the datetime.astimezone() method.
* gh-110383: Improve 'old string formatting' text in tutorial (#120219)Erlend E. Aasland2024-06-071-3/+5
|
* gh-119016: Remove outdated sentences from the "classes" tutorial (#119130)Nice Zombies2024-06-011-5/+1
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* docs: fix a few typos identified by codespell (#119516)Ned Batchelder2024-05-261-1/+1
|
* GH-110383: Improve Tutorial for Input Ouput (#119230)Blaise Pabon2024-05-211-4/+16
| | | | Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
* gh-119078: Clarify venv tutorial (GH-119129)Nice Zombies2024-05-181-4/+4
|
* Format None, True, False and NotImplemented as literals (GH-118758)Serhiy Storchaka2024-05-081-1/+1
|
* Python 3.14.0a0Thomas Wouters2024-05-083-5/+5
|
* Remove Python 3.5 hardcoded version in the tutorial appendix (GH-117612)Kerim Kabirov2024-05-071-2/+2
|
* gh-111201: A new Python REPL (GH-111567)Pablo Galindo Salgado2024-05-051-0/+22
| | | | | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Marta Gómez Macías <mgmacias@google.com> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* Add 'The Python 2.3 Method Resolution Order' (#116435)Hugo van Kemenade2024-04-151-1/+1
|
* gh-117597: Clarify exception handling in the tutorial (#117681)Nice Zombies2024-04-091-3/+3
|
* gh-116563: Update tutorial error example (#116569)Terry Jan Reedy2024-03-111-4/+4
| | | | | There now may be multiple carets pointing at a token rather than just a character. Fix the sentence about possible causes.
* GH-116271 Docs: provide clarification for object assignments in the Tutorial ↵Kerim Kabirov2024-03-041-7/+24
| | | | | | | section (#116283) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* Docs: Use substitutions instead of manual version updates (#115416)Hugo van Kemenade2024-02-143-4/+4
|