Commit Graph

824 Commits

Author SHA1 Message Date
Serhiy Storchaka 17070f41d4 gh-144837: Improve documentation for more collection methods (GH-144841)
Use uniform standard signature syntax in the tutorial and in
the array and collections modules documentation.
2026-03-26 21:29:23 +02:00
Hugo van Kemenade 83360b5869 Docs: replace all datetime imports with import datetime as dt (#145640) 2026-03-21 18:02:06 +02:00
Bartosz Grabowski 2c6afb935a docs: fix f-string in ExceptionGroup example (#146108) 2026-03-18 16:49:15 +00:00
Ned Batchelder 4f5e79805e Docs: a brief note in the sets tutorial about order (#145984)
Docs: a brief note in the sets tut about order
2026-03-17 05:03:11 -04:00
Maurizio Sambati 6d1e9ceed3 Docs: except with multiple exceptions parentheses not required (#145848)
As of PEP 758 the except statement doesn't require parentheses anymore for exception tuples.

See: https://peps.python.org/pep-0758/
2026-03-13 05:40:20 -04:00
James 5a15a52dd1 gh-145642: Docs: Avoid warning for invalid escape sequence in tutorial (#145643)
* Match tutorial output to real interpreter output

* Avoid invalid escape sequence in example

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

---------

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2026-03-08 18:41:47 -04:00
Ned Batchelder 852ec18978 Docs: remove unneeded author attributions (#145002)
These directives are not maintained and misleadingly indicate individual
rather than community ownership.

See https://github.com/python/docs-community/issues/180 for discussion,
and https://github.com/python/devguide/pull/1740 for an update to the
devguide.

Also ensured that everyone is in the Misc/ACKS file.
2026-02-19 18:45:28 -05:00
Ronald Eddy Jr 3718f4be60 Fix typos and grammar errors across documentation (#144709) 2026-02-11 16:35:25 +00:00
adam j hartz ccbe41e27c gh-143055: Implementation of PEP 798 (#143056)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-01-30 20:37:52 -08:00
Kuang Yu Heng 971f387bbb 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.

Signed-off-by: Kuang Yu Heng <yuheng3107@gmail.com>
2026-01-12 15:30:35 +00:00
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