Commit Graph

794 Commits

Author SHA1 Message Date
Kattni 742d5b5c5d Docs: Add note to tutorial clarifying scope (#134534)
* Add note to tutorial

* Update formatting
2025-05-22 14:26:47 -04:00
Yongzi Li 4ce91871a9 fix indent in controlflow.rst docs (#134008) 2025-05-18 21:51:02 +05:30
Oleg Burnaev c1c9ad1d5a gh-133881: add forward reference to list.sort() in lambda expression tutorial (#133910) 2025-05-17 09:59:37 +02:00
Stan Ulbrych 3224b99872 Doc: Allow translating a code block in the tutorial (#131353)
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-08 09:22:04 +00:00
Hugo van Kemenade 9748fb3867 Python 3.15.0a0 2025-05-07 18:47:42 +03:00
Irit Katriel ffc2f1dd1c gh-130080: implement PEP 765 (#130087) 2025-03-17 20:48:54 +00:00
Petr Viktorin 30d5205849 gh-116666: Add "token" glossary term (GH-130888)
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>
2025-03-17 17:05:47 +01:00
Tshepang Mbambo 1b5db5adfe GH-130153: Reword the wildcard matching part of the tutorial (GH-129954) 2025-03-05 14:59:47 -08:00
za 73801864d8 gh-122876: Fix "End of lines" typo (#125310)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-19 19:16:38 +00:00
shallow-beach 5a584c8f54 Python Tutorial typo fix (#128077) 2024-12-20 18:09:56 +01:00
Yuki Kobayashi 77a61c0465 gh-101100: amend references starting with !~ in gh-127054 (#127684) 2024-12-06 16:09:20 +02:00
Yuki Kobayashi 3e812253ab gh-101100: Fix Sphinx warnings about list methods (#127054) 2024-12-02 15:51:35 +02:00
funkyrailroad 26ff32b305 gh-127265: Remove single quotes from 'arrow's in tutorial/errors.rst (GH-127267) 2024-11-25 15:34:01 -06:00
amaajemyfren a3443c0e22 gh-85583: Add f-string index in tutorial/inputoutput.rst (GH-21681)
* 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>
2024-10-30 10:26:29 -07:00
Ned Batchelder 2d9d10179f docs: restore an anchor to for/else (#126154) 2024-10-29 20:11:50 -04:00
Bogdana Vereha a78d5b3242 Fix a typo in `Doc/tutorial/errors.rst` exception output (#126001) 2024-10-26 18:26:35 +03:00
Cornelius Roemer aab3210271 gh-125615: Fix grammar nit in tutorial's interactive interpreter appendix (GH-125617)
Replace "without ... nor" with "with neither ... nor"
2024-10-16 15:53:30 -05:00
partev 6c386b703d gh-125403: fix console formatting in Chapter 12 of the tutorial (#125404) 2024-10-13 22:16:15 +05:30
Wulian 283ea5f3b2 gh-125383: Update fib function comment for accuracy (#125386)
`Doc/tutorial/controlflow.rst`: fix comment for `fib` function
2024-10-13 14:10:59 +03:00
Stephen Rosen 4a2282b067 Prefer "similar" over "equivalent" in tutorial (#125343)
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.
2024-10-12 16:21:55 -04:00
Rafael Fontenelle 5a074aab84 Doc: Fix a typo in "Function Examples" in the control-flow tutorial (#125338) 2024-10-12 01:40:33 +01:00
Alex Waygood 3024b16d51 gh-101100: Consolidate documentation on ModuleType attributes (#124709)
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>
2024-10-09 10:53:57 +00:00
Ned Batchelder 6e3c70c61b Docs: make a tutorial example more precise (#125066)
Based on discussion here:

https://discuss.python.org/t/omission-in-the-documentation/66816
2024-10-07 19:41:13 -04:00
Ned Batchelder 5329d1b74a Docs: for for/else clarify that return or raise also skip the else (#124591)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-09-27 06:17:25 -04:00
Ned Batchelder ffdc80e93d For-else deserves its own section in the tutorial (#123946)
* 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>
2024-09-25 19:18:18 -04:00
Alex Waygood 0d9d56c4e4 gh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs (#124480) 2024-09-25 19:29:58 +00:00
Rafael Fontenelle 39612103dd Update to 3.13 the output of exceptions raised (#123888) 2024-09-13 15:17:30 +00:00
Wei-Hsiang (Matt) Wang 103a0470e3 gh-123492: Remove unnecessary :func: parentheses (#123493) 2024-08-30 14:34:09 +03:00
Adam Turner b106cf8d97 GH-109975: Copyedit 3.13 What's New: New Features (#122990)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2024-08-15 10:08:15 +01:00
Damien be90648fb2 gh-122944: Fix incorrect prompt strings in the Python Tutorial (#122949)
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.
2024-08-12 14:30:08 -04:00
Serhiy Storchaka 1a0c7b9ba4 gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
Bénédikt Tran f4d6e45c1e gh-120452: improve documentation about private name mangling (#120451)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-07-13 07:45:18 -07:00
Serhiy Storchaka 92c9c6ae14 gh-120345: Fix incorrect use of the :class: role with the "()" suffix (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.
2024-06-12 17:23:03 +03:00
Erlend E. Aasland 225aab7f70 gh-110383: Improve 'old string formatting' text in tutorial (#120219) 2024-06-07 15:37:18 +02:00
Nice Zombies c618f7d80e gh-119016: Remove outdated sentences from the "classes" tutorial (#119130)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-06-01 21:20:00 +00:00
Ned Batchelder d25954dff5 docs: fix a few typos identified by codespell (#119516) 2024-05-25 18:13:31 -07:00
Blaise Pabon 9db2fd7eda GH-110383: Improve Tutorial for Input Ouput (#119230)
Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
2024-05-21 16:25:37 +00:00
Nice Zombies 0f5e8bed63 gh-119078: Clarify venv tutorial (GH-119129) 2024-05-18 12:44:02 +01:00
Serhiy Storchaka 05c2fe1acd Format None, True, False and NotImplemented as literals (GH-118758) 2024-05-08 22:35:16 +03:00
Thomas Wouters 7768ff1e41 Python 3.14.0a0 2024-05-08 16:57:05 +02:00
Kerim Kabirov a855f824a2 Remove Python 3.5 hardcoded version in the tutorial appendix (GH-117612) 2024-05-07 15:28:16 +02:00
Pablo Galindo Salgado f27f8c790a gh-111201: A new Python REPL (GH-111567)
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>
2024-05-05 21:32:23 +02:00
Hugo van Kemenade 7d0be7aea5 Add 'The Python 2.3 Method Resolution Order' (#116435) 2024-04-15 13:01:15 +03:00
Nice Zombies a05068db0c gh-117597: Clarify exception handling in the tutorial (#117681) 2024-04-09 20:59:45 +00:00
Terry Jan Reedy 3e45030076 gh-116563: Update tutorial error example (#116569)
There now may be multiple carets pointing at a token
rather than just a character.  Fix the sentence about
possible causes.
2024-03-11 18:01:08 -04:00
Kerim Kabirov 45a92436c5 GH-116271 Docs: provide clarification for object assignments in the Tutorial section (#116283)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-03-04 12:22:13 +00:00
Hugo van Kemenade 46245b0d83 Docs: Use substitutions instead of manual version updates (#115416) 2024-02-13 23:55:00 -07:00
srinivasan 57c3e775df gh-114648: Add IndexError exception to tutorial datastructures list.pop entry (#114681)
Remove redundant explanation of optional argument.
2024-01-31 22:46:49 -05:00
Terry Jan Reedy 31a2543c80 gh-114069: Revise Tutorial Methods paragraph (#114127)
Remove excess words in the first and third sentences.
2024-01-16 11:33:05 -05:00
Andrew Zipperer 32f3684b8f Tutorial: Clarify 'nonzero exit status' in the appendix (#112039) 2024-01-12 22:42:51 +00:00