Commit Graph

814 Commits

Author SHA1 Message Date
Bartosz Sławecki 2d9f4e357a gh-143048: Remove outdated mention to curses in the "Interactive Mode" docs (#143049) 2026-01-01 12:52:21 +01:00
decorator-factory f6b6a99aa5 gh-142411: Change documentation to reflect the new docstring adjustments in 3.13 (#142413) 2025-12-14 00:29:59 +02:00
Thierry Martos cd4d0ae75c Improve clarity in tutorial introduction (#140669) 2025-11-30 12:47:31 +00:00
Bob Kline fbcac79951 gh-141412: Use reliable target URL for urllib example (GH-141428)
The endpoint used for demonstrating reading URLs is no longer
stable. This change substitutes a target over which we have more
control.
2025-11-12 12:25:23 -06:00
Krishna Chaitanya 92741c59f8 gh-140379: add hyperlinks to list and set (GH-140399)
add hyperlinks to list and set
2025-11-10 22:02:46 -08:00
Filip Łajszczak ce1bb85d28 gh-139434: Update selected RFC 2822 references to RFC 5322 (#139435)
Update selected RFC 2822 references to RFC 5322

RFC 2822 was obsoleted by RFC 5322 in 2008. This updates references
to use the current standard in documentation, docstrings, and comments.

It preserves RFC 2822 references in legacy API components to maintain their
historical context.

RFC 822 → RFC 2822 → RFC 5322 progression is explained where relevant.

In some places specific sections of RFC are referenced where it seems helpful.

Scout rule was applied in some places and RFC mentions format was
normalized in doc strings and comments.
2025-11-04 14:46:07 -05:00
commitWithTisha 08115d241a Fix minor typo: 'web site' -> 'website' (GH-140561) 2025-11-04 10:23:49 +01:00
Cycloctane 69cfad0b3e gh-116488: Mention dict.get in the data structures tutorial (GH-139643) 2025-10-06 09:04:59 -04:00
Adam Turner 22cb9ba8f9 GH-101100: Remove some entries from `nitpick_ignore` (#138464) 2025-09-08 22:10:26 +00:00
Adam Turner 8ed1d53e62 GH-138465: Improve documentation for common sequence methods (#138474)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-09-05 20:55:02 +01:00
Ric f19f1d8563 gh-107194: Improved language of list.index in tutorial (gh-138518) 2025-09-05 15:16:04 +08:00
Adorilson Bezerra 88665de120 gh-138307: Update the Ellipsis documentation (#138306)
* Doc: Change Ellipsis doc at library/constants

* Doc: Change Ellipsis doc at library/stdtypes

* Doc: Add NumPy reference into Ellipsis doc at library/stdtypes

* Doc: Add Ellipsis reference into the pass statement section at tutorial

* Doc: Update Ellipsis doc concerns assignments at library/constants

* Update Doc/library/stdtypes.rst

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>

* Doc: Fix grammar on Ellipsis docs (library/constants.rst)

Co-authored-by: Éric <merwok@netwok.org>

* Doc: Fix grammar on Ellipsis docs (library/stdtypes.rst)

Co-authored-by: Éric <merwok@netwok.org>

* Doc: Fix grammar on Ellipsis docs (library/stdtypes.rst)

Co-authored-by: Éric <merwok@netwok.org>

* Doc: Remove pretty printers reference from Ellipsis doc at library/stdtypes

* Doc: Update index concerns Ellipsis object and pass statement

* Doc: Improve Ellipsis doc at library/constants

* Doc: Improve Ellipsis doc at library/stdtypes

* Doc: Change the "..." glossary entry to mention the Ellipsis object

* Doc: Some improvements concern ellipsis into typing doc

* Minor update Doc/tutorial/controlflow.rst

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>

* Update Doc/library/constants.rst

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>

* Update Doc/library/stdtypes.rst

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>

---------

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2025-09-03 07:27:22 -04:00
Terry Jan Reedy 339f5da639 gh-138011: Clarify tutorial method object example code (#138014)
x must be a MyClass instance for examples to work.

---------
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-08-21 11:02:29 -04:00
Konstantin Morenko c58020ed32 gh-109975: Indicate the minimum version for PyREPL in the tutorial (#136046) 2025-08-14 16:45:12 +01:00
Adam Turner 4dae9b1ff1 gh-132661: PEP 750 documentation: second pass (#137020) 2025-08-04 22:45:51 +01:00
Jelle Zijlstra 11503211c6 gh-136843: Document how multiple inheritance works (#136844)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2025-07-28 12:35:40 -07:00
Dave Peck 22c8658906 gh-132661: Document t-strings and templatelib (#135229)
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>
2025-07-22 12:44:13 +03:00
Josh Cannon 4b68289ca6 Pedantic rewording of why relative importing doesn't work in main modules (GH-136846)
Pedantically reword the section about relative imports and main modules.
2025-07-21 09:30:17 -07:00
Stan Ulbrych 254bdac711 Update tutorial for new "Copy" button (#135007)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-06-08 19:33:19 +03:00
Jean-Louis GUENEGO 343182853f feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. (#135181)
Giving the right example incitates the tutorial readers to do the same in the future.
2025-06-06 15:16:12 +02:00
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