summaryrefslogtreecommitdiffstats
path: root/Doc/reference
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] Docs: Miscellaneous corrections to simple statements in the language ↵Carol Willing2024-12-021-22/+11
| | | | | | | | | | | reference (GH-126720) (#126891) * Replace: The :keyword:`global` -> The :keyword:`global` statement Add :keyword: when it's needed * Replace repeated links with duoble backticks (cherry picked from commit 94a7a4e22fb8f567090514785c69e65298acca42) Co-authored-by: Beomsoo Kim <beoms424@gmail.com>
* [3.12] Document that return-less user-defined functions return None ↵Miss Islington (bot)2024-11-141-1/+2
| | | | | | | | | | (GH-126769) (#126823) Document that return-less user-defined functions return None (GH-126769) (cherry picked from commit e0692f11650acb6c2eed940eb94650b4703c072e) Co-authored-by: John Marshall <jmarshall@hey.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* [3.12] gh-126664: Use `else` instead of `finally` in "The with statement" ↵Miss Islington (bot)2024-11-111-5/+2
| | | | | | | | documentation. (GH-126665) (#126671) gh-126664: Use `else` instead of `finally` in "The with statement" documentation. (GH-126665) (cherry picked from commit 25257d61cfccc3b4189f96390a5c4db73fd5302c) Co-authored-by: vivodi <103735539+vivodi@users.noreply.github.com>
* [3.12] Postpone `module.__loader__` deprecation to Python 3.16 (GH-126482) ↵Miss Islington (bot)2024-11-101-2/+2
| | | | | | | | (#126637) Postpone `module.__loader__` deprecation to Python 3.16 (GH-126482) (cherry picked from commit 450db61a78989c5a1f1106be01e071798c783cf9) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.12] gh-101865: Docs: Keep co_lnotab deprecation for at least 3.14 ↵Hugo van Kemenade2024-11-041-1/+1
| | | | | (GH-126392) (#126404) (cherry picked from commit eac41c5ddfadf52fbd84ee898ad56aedd5d90a41)
* [3.12] gh-60712: Include the "object" type in the lists of documented types ↵Miss Islington (bot)2024-10-301-15/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-103036) (GH-126198) gh-60712: Include the "object" type in the lists of documented types (GH-103036) * add test for the predefined object's attributes * Include the "object" type in the lists of documented types * remove 'or' from augment tuple * 📜🤖 Added by blurb_it. * Add cross-reference to news * Fix format for the function parameter * Add space * add reference for the 'object' * add reference for NotImplemented * Change ref:`string <textseq>` as class:`str` * remove hyphen from `newly-created` * Update Doc/reference/datamodel.rst 'dictionaries' to 'dict' * Update predefined attribute types in testPredefinedAttrs * Change `universal type` as `top type` * Don't mention about the top type * Update the description of richcmpfuncs * Update Doc/library/stdtypes.rst * Revert: Hierarchy Section in Data Model Documentation * Revert to original explanations of __new__ and __init__ methods in datamodel.rst for improved clarity. * Update Doc/reference/datamodel.rst * Remove blank line * Use ref:`str <textseq>` instead of :class:`str * Revert changes the description of Other Built-in Types in stdtypes.rst * Update Doc/reference/datamodel.rst --------- (cherry picked from commit 4f826214b30ad50365f45bf07e4a02f34f897ab5) Co-authored-by: Furkan Onder <furkanonder@protonmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* [3.12] gh-125461: Remove Python 2 from identifiers in doc (GH-125462) (#125465)Miss Islington (bot)2024-10-141-3/+2
| | | | | | | | gh-125461: Remove Python 2 from identifiers in doc (GH-125462) Remove Python 2 from identifiers in doc (cherry picked from commit 5dac0dceda9097d46a0b5a6ad7c927e002c6c7a5) Co-authored-by: Paul Hoffman <phoffman@proper.com>
* [3.12] gh-101100: Consolidate documentation on `ModuleType` attributes ↵Alex Waygood2024-10-092-162/+231
| | | | | | | | (#124709) (#125211) 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>
* [3.12] gh-115528: Update language reference for PEP 646 (GH-121181) (#124633)Miss Islington (bot)2024-09-262-17/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gh-115528: Update language reference for PEP 646 (GH-121181) To recap: the objective is to make starred expressions valid in `subscription`, which is used for generics: `Generic[...]`, `list[...]`, etc. What _is_ gramatically valid in such contexts? Seemingly any of the following. (At least, none of the following throw `SyntaxError` in a 3.12.3 REPL.) Generic[x] Generic[*x] Generic[*x, y] Generic[y, *x] Generic[x := 1] Generic[x := 1, y := 2] So introducting flexible_expression: expression | assignment_expression | starred_item end then switching `subscription` to use `flexible_expression` sorts that. But then we need to field `yield` - for which any of the following are apparently valid: yield x yield x, yield x, y yield *x, yield *x, *y Introducing a separate `yield_list` is the simplest way I've been figure out to do this - separating out the special case of `starred_item ,`. (cherry picked from commit 7d3497f617edf77cb6ead6f5e62bce98d77b9ab8) Co-authored-by: Matthew Rahtz <matthew.rahtz@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-101100: Make __subclasses__ doctest stable (GH-124577) (#124580)Jelle Zijlstra2024-09-261-2/+4
| | | | | | Using a standard library class makes this test difficult to maintain as other tests and other parts of the stdlib may create subclasses, which may still be alive when this test runs depending on GC timing. (cherry picked from commit 08a467b537b3d9b499d060697e79b3950374ab0f)
* [3.12] gh-123242: Note that type.__annotations__ may not exist (GH-124557) ↵Jelle Zijlstra2024-09-251-0/+8
| | | | | | | | (#124562) Closes GH-123242. The real criterion is that the attribute does not exist on heap types, but I don't think we should discuss heap vs. static types in the language reference. (cherry picked from commit 99b23c64de301c9e77add6b0d8e60118ef807840)
* [3.12] gh-101100: Add a table of class attributes to the "Custom classes" ↵Alex Waygood2024-09-254-44/+99
| | | | section of the data model docs (#124480) (#124558)
* [3.12] GH-103484: Fix permanently redirects reported by linkcheck ↵Miss Islington (bot)2024-09-171-1/+1
| | | | | | | | (GH-124144) (GH-124152) Fix redirects reported by linkcheck, update docs conf.py checks. (cherry picked from commit 0a32c6959c265d21d7c43fe8e4aefc8c0983e85e) Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
* [3.12] gh-123580: Fix `signed_number` token in documentation (GH-123582) ↵Miss Islington (bot)2024-09-041-1/+1
| | | | | | | | | | (GH-123624) gh-123580: Fix `signed_number` token in documentation (GH-123582) (cherry picked from commit 9e079c220b7f64d78a1aa36a23b513d7f377a694) Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* [3.12] gh-123621: Fix `datamodel.rst` with proper `dict` notation ↵Miss Islington (bot)2024-09-031-1/+1
| | | | | | | | (GH-123648) (#123654) gh-123621: Fix `datamodel.rst` with proper `dict` notation (GH-123648) (cherry picked from commit cfbc841ef3c27b3e65d1223bf8fedf1f652137bc) Co-authored-by: Lipták Attila (Flash) <113017309+AttilaLiptak@users.noreply.github.com>
* [3.12] gh-123579: Document exclamation token (GH-123612) (#123638)Miss Islington (bot)2024-09-031-3/+3
| | | | | (cherry picked from commit 68fe5758bf1900ffdcdf7cd9e40f5018555a39d4) Co-authored-by: Shaygan Hooshyari <sh.hooshyari@gmail.com>
* [3.12] gh-123517: Remove unnecessary `:meth:` parentheses (gh-123518) ↵Wei-Hsiang (Matt) Wang2024-09-022-3/+3
| | | | (GH-123576)
* [3.12] gh-123492: Remove unnecessary `:func:` parentheses (gh-123493) (#123512)Wei-Hsiang (Matt) Wang2024-08-301-1/+1
|
* [3.12] gh-122701: Fix wording of raw strings/bytes in `lexical_analysis.rst` ↵Miss Islington (bot)2024-08-111-5/+4
| | | | | | | | | (GH-122702) (#122915) gh-122701: Fix wording of raw strings/bytes in `lexical_analysis.rst` (GH-122702) (cherry picked from commit ea70439bd2b5a1c881342646f30942f527f61373) Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.12] gh-122511: Improve documentation for object identity of ↵Miss Islington (bot)2024-08-071-6/+10
| | | | | | | | | mutable/immutable types (GH-122512) (#122779) gh-122511: Improve documentation for object identity of mutable/immutable types (GH-122512) (cherry picked from commit 76bdeebef6c6206f3e0af1e42cbfc75c51fbb8ca) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.12] Remove outdated note about instance methods from datamodel.rst ↵Miss Islington (bot)2024-07-301-8/+1
| | | | | | | | (GH-122471) (#122480) Remove outdated note about instance methods from datamodel.rst (GH-122471) (cherry picked from commit c68cb8e0c9bd75ded25578c2fba6469e55a06e93) Co-authored-by: Thomas Grainger <tagrain@gmail.com>
* [3.12] gh-121905: Consistently use "floating-point" instead of "floating ↵Serhiy Storchaka2024-07-193-21/+21
| | | | | point" (GH-121907) (GH-122013) (cherry picked from commit 1a0c7b9ba48a2dffb70bb0c7327abae1d3e87356)
* [3.12] gh-120452: improve documentation about private name mangling ↵Miss Islington (bot)2024-07-131-11/+40
| | | | | | | | | (GH-120451) (#121716) gh-120452: improve documentation about private name mangling (GH-120451) (cherry picked from commit f4d6e45c1e7161878b36ef9e876ca3e44b80a97d) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-121355: Fix incorrect word in simple_stmts.rst (GH-121356) (#121363)Miss Islington (bot)2024-07-041-1/+1
| | | | | (cherry picked from commit 715ec630dd78819ed79cad5ac28617daefe1e745) Co-authored-by: Jongbum Won <71166964+Wondaeng@users.noreply.github.com>
* [3.12] gh-114104: clarify asynchronous comprehension docs to match runtime ↵Miss Islington (bot)2024-07-011-4/+6
| | | | | | | | behavior (GH-121175) (#121235) gh-114104: clarify asynchronous comprehension docs to match runtime behavior (GH-121175) (cherry picked from commit 91313afdb392d0d6105e9aaa57b5a50112b613e7) Co-authored-by: Danny Yang <yangdanny97@users.noreply.github.com>
* [3.12] doc: Mention the missing reflected special methods for all binary ↵Miss Islington (bot)2024-06-291-7/+17
| | | | | | | | operations (GH-119931) (#120064) doc: Mention the missing reflected special methods for all binary operations (GH-119931) (cherry picked from commit bf5e1065f4ec2077c6ca352fc1ad940a76d1f6c9) Co-authored-by: Paulo Freitas <me@paulofreitas.me>
* [3.12] gh-120937: Reference weakref from the `__del__` documentation ↵Miss Islington (bot)2024-06-261-0/+2
| | | | | | | | | (GH-120940) (#121062) gh-120937: Reference weakref from the `__del__` documentation (GH-120940) (cherry picked from commit 1c13b29d54ad6d7c9e030227d575ad7d21b4054f) Co-authored-by: chaen <christophe.haen@cern.ch> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.12] gh-120521: clarify except* documentation to allow tuples (GH-120523) ↵Miss Islington (bot)2024-06-191-9/+10
| | | | | | | | | (#120751) (cherry picked from commit 58b3f111767148e9011ccd52660e208f0c834b2a) Co-authored-by: Danny Yang <yangdanny97@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] annotations: expand documentation on "simple" assignment targets ↵Miss Islington (bot)2024-06-151-2/+5
| | | | | | | | | | | | (GH-120535) (#120556) This behavior is rather surprising and it was not clearly specified. (cherry picked from commit 9e0b11eb21930b7b8e4a396200a921e9985cfca4) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-100117: Fix inaccuracy in documentation of the CodeObject's ↵Miss Islington (bot)2024-05-311-1/+1
| | | | | | | | co_positions field. (GH-119364) (#119870) gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. (GH-119364) (cherry picked from commit 015b1fdd0ae03f94a5dfda051b020810d1c952dd) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] Clarifying nonlocal doc: SyntaxError is raised if nearest enclosing ↵Miss Islington (bot)2024-04-211-2/+3
| | | | | | | | | scope is global (GH-114009) (#118128) Clarifying nonlocal doc: SyntaxError is raised if nearest enclosing scope is global (GH-114009) (cherry picked from commit 1558d993166636f371c1003107ec979db6744f21) Co-authored-by: Quazi Irfan <quazirfan@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] Add 'The Python 2.3 Method Resolution Order' (GH-116435) (#117885)Hugo van Kemenade2024-04-151-5/+2
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.12] Add information about negative indexes to sequence datamodel doc ↵Miss Islington (bot)2024-03-251-3/+6
| | | | | | | | (GH-110903) (#117238) Co-authored by Terry Jan Reedy (cherry picked from commit c2276176d543a2fc2d57709c2787f99850fbb073) Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
* [3.12] gh-56374: Clarify documentation of nonlocal (GH-116942) (#117023)Miss Islington (bot)2024-03-191-13/+17
| | | | | | | Define 'nonlocal scopes' in a way that excludes class scopes. Rearrange the rest of the doc. Add "Programmer's note". (cherry picked from commit 025ef7a5f7b424fba8713e448244b952bf897df3) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.12] gh-107607: Update comment about utf-8 BOM being ignored (GH-107858) ↵Miss Islington (bot)2024-03-191-4/+3
| | | | | | (#117016) (cherry picked from commit 7f64ae30ddc22577ce4101ce0b6601b3548b036f) Co-authored-by: Terry Jan Reedy tjreedy@udel.edu
* [3.12] gh-116881: Remove erroneous or redundant grammar NULL (GH-116885) ↵Miss Islington (bot)2024-03-181-1/+1
| | | | | | | | | | | (#116951) In Lexical Analysis f-strings section, NULL in the description of 'literal character' means '\0'. In the format_spec grammar production, it is wrong with that meaning and redundant if instead interpreted as <nothing>. Remove it there. (cherry picked from commit 4e45c6c54a9457b1ca5b4cf3aa2843b7218d4414) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.12] gh-115664: Fix ordering of more versionadded and versionchanged ↵Serhiy Storchaka2024-03-072-3/+1
| | | | | directives (GH-116298) (GH-116450) (cherry picked from commit 808a77612fb89b125d25efac2788522a100e8a6d)
* [3.12] gh-72971: Clarify the special no-TypeError behavior for equality ↵Miss Islington (bot)2024-03-031-1/+4
| | | | | | | (GH-110729) (#116254) (cherry picked from commit 67f742e03aacb6217c5bb496e31f96dbf31c6f86) Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
* [3.12] gh-104219: Document that idunders can return NotImplemented ↵Miss Islington (bot)2024-03-011-2/+4
| | | | | | | | | (GH-104220) (#116210) (cherry picked from commit 2713c2abc8d0f30cd0060cd307bb4ec92f1f04bf) Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] Docs: mark up NotImplemented using the :data: role throughout the ↵Miss Islington (bot)2024-02-292-10/+10
| | | | | | | docs (GH-116135) (#116147) (cherry picked from commit dbe44f150cd161bd327ed662e527a4c93829fb3e) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* [3.12] Erase some unnecessary quotes on data model doc (GH-113521) (#115896)Miss Islington (bot)2024-02-251-4/+4
| | | | | | | Thanks to Pedro Arthur Duarte (pedroarthur.jedi at gmail.com) for help with this bug. (cherry picked from commit f7455864f22369cc23bf3428624f310305cac999) Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
* [3.12] gh-115572: Move `codeobject.replace()` docs to the data model … ↵Kirill Podoprigora2024-02-181-0/+6
| | | | | | | | | | | | | | (#115633) * [3.12] gh-115572: Move `codeobject.replace()` docs to the data model (GH-115631) (cherry picked from commit 0c80da4c14d904a367968955544dd6ae58c8101c) Co-authored-by: Daler <48939169+daler-sz@users.noreply.github.com> * Remove note about copy.replace --------- Co-authored-by: Daler <48939169+daler-sz@users.noreply.github.com>
* [3.12] gh-115405: add versionadded tag for co_qualname in code objects ↵Miss Islington (bot)2024-02-131-0/+2
| | | | | | | | documentation (GH-115411) (#115412) gh-115405: add versionadded tag for co_qualname in code objects documentation (GH-115411) (cherry picked from commit de07941729b8899b187b8ef9690f9a74b2d6286b) Co-authored-by: Christophe Papazian <114495376+christophe-papazian@users.noreply.github.com>
* [3.12] gh-114552: Update `__dir__` method docs: it allows returning an ↵Miss Islington (bot)2024-02-101-3/+3
| | | | | | | | iterable (GH-114662) (#115234) gh-114552: Update `__dir__` method docs: it allows returning an iterable (GH-114662) (cherry picked from commit e19103a346f0277c44a43dfaebad9a5aa468bf1e) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] Clarify one-item tuple (GH-114745) (#114757)Miss Islington (bot)2024-01-301-2/+3
| | | | | | | A 'single tuple' means 'one tuple, of whatever length. Remove the unneeded and slightly distracting parenthetical 'singleton' comment. (cherry picked from commit a1332a99cf1eb9b879d4b1f28761b096b5749a0d) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.12] gh-101100: Fix sphinx warnings in `reference/import.rst` (GH-114646) ↵Miss Islington (bot)2024-01-271-3/+4
| | | | | | (#114652) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-101100: Fix Sphinx warnings in `reference/expressions.rst` ↵Miss Islington (bot)2024-01-221-26/+26
| | | | | | (GH-114194) (#114436) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.12] Fix the confusing "User-defined methods" reference in the datamodel ↵Miss Islington (bot)2024-01-211-1/+1
| | | | (GH-114276) (#114365)
* [3.12] gh-114070: fix token reference warnings in expressions.rst ↵Miss Islington (bot)2024-01-171-2/+3
| | | | | | (GH-114169) (#114192) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* [3.12] datamodel: Fix a typo in ``object.__init_subclass__`` (GH-111599) ↵Miss Islington (bot)2024-01-121-1/+1
| | | | | | | | (#114004) datamodel: Fix a typo in ``object.__init_subclass__`` (GH-111599) (cherry picked from commit a47353d587b78bb5501b21343d9bca739c49a43a) Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>