Commit Graph

821 Commits

Author SHA1 Message Date
Miss Islington (bot) 41f475c996 [3.14] gh-149035: Modernize legacy Python patterns in Doc/tutorial/stdlib2.rst (GH-149036) (#149089)
Co-authored-by: ByteFlow <fakeshadow1337@gmail.com>
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 05:17:18 +00:00
Miss Islington (bot) de54353235 [3.14] gh-144837: Improve documentation for more collection methods (GH-144841) (GH-146483)
Use uniform standard signature syntax in the tutorial and in
the array and collections modules documentation.
(cherry picked from commit 17070f41d4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-03-26 19:55:25 +00:00
Miss Islington (bot) abd276ab3d [3.14] docs: fix f-string in ExceptionGroup example (GH-146108) (GH-146126)
(cherry picked from commit 2c6afb935a)

Co-authored-by: Bartosz Grabowski <58475557+bartosz-grabowski@users.noreply.github.com>
2026-03-24 00:09:00 +01:00
Miss Islington (bot) d65e8d9094 [3.14] Docs: replace all datetime imports with import datetime as dt (GH-145640) (#146258)
Docs: replace all `datetime` imports with `import datetime as dt` (GH-145640)
(cherry picked from commit 83360b5869)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-21 20:19:07 +02:00
Miss Islington (bot) 4601007395 [3.14] Docs: a brief note in the sets tutorial about order (GH-145984) (#146049)
Docs: a brief note in the sets tutorial about order (GH-145984)
(cherry picked from commit 4f5e79805e)


Docs: a brief note in the sets tut about order

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2026-03-17 05:18:11 -04:00
Miss Islington (bot) b5e5013378 [3.14] Docs: except with multiple exceptions parentheses not required (GH-145848) (#145904)
Docs: except with multiple exceptions parentheses not required (GH-145848)

As of PEP 758 the except statement doesn't require parentheses anymore for exception tuples.
(cherry picked from commit 6d1e9ceed3)


See: https://peps.python.org/pep-0758/

Co-authored-by: Maurizio Sambati <duilio@users.noreply.github.com>
2026-03-13 06:12:02 -04:00
Miss Islington (bot) d910638418 [3.14] gh-145642: Docs: Avoid warning for invalid escape sequence in tutorial (GH-145643) (#145647)
gh-145642: Docs: Avoid warning for invalid escape sequence in tutorial (GH-145643)

---------
(cherry picked from commit 5a15a52dd1)

Co-authored-by: James <snoopjedi@gmail.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2026-03-09 00:05:09 +01:00
Stan Ulbrych b1accd51d8 [3.14] Fix typos and grammar errors across documentation (GH-144709) (#144801)
(cherry picked from commit 3718f4be60)

Co-authored-by: Ronald Eddy Jr <ronald_eddy@yahoo.com>
2026-02-17 12:53:42 +00:00
Miss Islington (bot) 145879b402 [3.14] gh-137113 docs: note readline no longer supported in REPL after 3.13 (GH-137142) (GH-143791)
gh-137113 docs: note readline no longer supported in REPL after 3.13 (GH-137142)

Add a note to the readline module documentation stating that
Python 3.13 and later no longer supports readline in the default REPL,
as per gh-118840. Includes workaround using PYTHON_BASIC_REPL.

Update tutorial to remove the reference, and use a different key to
test things out.
(cherry picked from commit 971f387bbb)

Signed-off-by: Kuang Yu Heng <yuheng3107@gmail.com>
Co-authored-by: Kuang Yu Heng <yuheng3107@gmail.com>
2026-01-14 10:55:52 +01:00
Miss Islington (bot) f6f3ddb401 [3.14] gh-143048: Remove outdated mention to curses in the "Interactive Mode" docs (GH-143049) (#143325)
gh-143048: Remove outdated mention to `curses` in the "Interactive Mode" docs (GH-143049)
(cherry picked from commit 2d9f4e357a)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2026-01-01 11:57:57 +00:00
decorator-factory 78dd2d5ba9 [3.14] gh-142411: Change documentation to reflect the new docstring adjustments in 3.13 (GH-142413) (#142689) 2025-12-14 14:22:30 +02:00
Miss Islington (bot) 3824ad0286 [3.14] Improve clarity in tutorial introduction (GH-140669) (#142112)
Co-authored-by: Thierry Martos <81799048+ThierryMT@users.noreply.github.com>
2025-11-30 12:53:05 +00:00
Miss Islington (bot) 996c00384d [3.14] gh-141412: Use reliable target URL for urllib example (GH-141474)
The endpoint used for demonstrating reading URLs is no longer
stable. This change substitutes a target over which we have more
control.
(cherry picked from commit fbcac79951)

Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
2025-11-12 18:40:20 +00:00
Miss Islington (bot) a468ba0a9d [3.14] gh-140379: add hyperlinks to list and set (GH-140399) (#141386)
gh-140379: add hyperlinks to list and set (GH-140399)

add hyperlinks to list and set
(cherry picked from commit 92741c59f8)

Co-authored-by: Krishna Chaitanya <141550576+XChaitanyaX@users.noreply.github.com>
2025-11-11 06:08:45 +00:00
Filip Łajszczak dc76de26e5 [3.14] gh-139434: Update selected RFC 2822 references to RFC 5322 (GH-139435) (#141025)
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.
(cherry picked from commit ce1bb85d28)
2025-11-04 16:23:16 -05:00
Miss Islington (bot) 5b88a6533c [3.14] Fix minor typo: 'web site' -> 'website' (GH-140561) (GH-140976)
(cherry picked from commit 08115d241a)

Co-authored-by: commitWithTisha <tishaa1010@gmail.com>
2025-11-04 14:11:08 +01:00
Miss Islington (bot) 57c37a4623 [3.14] gh-116488: Mention dict.get in the data structures tutorial (GH-139643) (#139655)
Co-authored-by: Cycloctane <Cycloctane@outlook.com>
2025-10-06 19:04:44 +03:00
Miss Islington (bot) dd930baf45 [3.14] gh-138307: Update the Ellipsis documentation (GH-138306) (#138440)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.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-11 12:22:37 +03:00
Miss Islington (bot) 829c81ae21 [3.14] GH-101100: Remove some entries from `nitpick_ignore` (GH-138464) (#138683)
* GH-101100: Remove some entries from ``nitpick_ignore`` (GH-138464)
(cherry picked from commit 22cb9ba8f9)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

* Update check-warnings.py

---------

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-09-09 19:12:40 +03:00
Miss Islington (bot) f153e32cba [3.14] GH-138465: Improve documentation for common sequence methods (GH-138474) (#138560)
GH-138465: Improve documentation for common sequence methods (GH-138474)
(cherry picked from commit 8ed1d53e62)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-09-06 08:51:48 +03:00
Miss Islington (bot) 66f256d874 [3.14] gh-107194: Improved language of list.index in tutorial (gh-138518) (#138527)
gh-107194: Improved language of list.index in tutorial (gh-138518)
(cherry picked from commit f19f1d8563)

Co-authored-by: Ric <11750904+ricsatjr@users.noreply.github.com>
2025-09-05 10:51:28 +03:00
Miss Islington (bot) 9e5ca3a411 [3.14] gh-138011: Clarify tutorial method object example code (GH-138014) (#138025)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-08-27 16:59:47 +03:00
Miss Islington (bot) e817d1aa2b [3.14] gh-132661: PEP 750 documentation: second pass (GH-137020) (#137392)
gh-132661: PEP 750 documentation: second pass (GH-137020)
(cherry picked from commit 4dae9b1ff1)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-08-16 09:21:29 +03:00
Miss Islington (bot) 3de6ea5d8f [3.14] gh-109975: Indicate the minimum version for PyREPL in the tutorial (GH-136046) (#137766)
Co-authored-by: Konstantin Morenko <konstantin-morenko@users.noreply.github.com>
2025-08-15 13:15:30 +03:00
Miss Islington (bot) c59a60bdb4 [3.14] gh-132661: Document t-strings and templatelib (GH-135229) (#136974)
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>
2025-07-22 13:32:00 +03:00
Miss Islington (bot) f86a59549b [3.14] Pedantic rewording of why relative importing doesn't work in main 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 4b68289ca6)

Co-authored-by: Josh Cannon <joshdcannon@gmail.com>
2025-07-21 09:58:27 -07:00
Miss Islington (bot) cf2209f5b9 [3.14] Update tutorial for new "Copy" button (GH-135007) (#135270)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-06-08 16:40:07 +00:00
Miss Islington (bot) 23552b3d8f [3.14] feat(docs): type fix - apply pep8 by using docstring instead of 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 343182853f)

Co-authored-by: Jean-Louis GUENEGO <jlguenego@gmail.com>
2025-06-06 13:22:50 +00:00
Miss Islington (bot) 37c2c8c9d8 [3.14] Docs: Add note to tutorial clarifying scope (GH-134534) (#134536)
Docs: Add note to tutorial clarifying scope (GH-134534)

* Add note to tutorial

* Update formatting
(cherry picked from commit 742d5b5c5d)

Co-authored-by: Kattni <kattni@kattni.com>
2025-05-22 18:32:49 +00:00
Miss Islington (bot) 11650c354f [3.14] fix indent in controlflow.rst docs (GH-134008) (#134184)
fix indent in `controlflow.rst` docs (GH-134008)
(cherry picked from commit 4ce91871a9)

Co-authored-by: Yongzi Li <1538321957@qq.com>
2025-05-18 16:29:03 +00:00
Miss Islington (bot) 075cabb026 [3.14] gh-133881: add forward reference to list.sort() in lambda expression tutorial (GH-133910) (#134126)
gh-133881: add forward reference to `list.sort()` in lambda expression tutorial (GH-133910)
(cherry picked from commit c1c9ad1d5a)

Co-authored-by: Oleg Burnaev <51371645+Shepard2154@users.noreply.github.com>
2025-05-17 08:05:47 +00:00
Miss Islington (bot) 3cd4c2db7b [3.14] Doc: Allow translating a code block in the tutorial (GH-131353) (#133648)
Doc: Allow translating a code block in the tutorial (GH-131353)
(cherry picked from commit 3224b99872)

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>
2025-05-08 09:28:58 +00: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