Define 'nonlocal scopes' in a way that excludes class scopes.
Rearrange the rest of the doc. Add "Programmer's note".
(cherry picked from commit 025ef7a5f7)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
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 4e45c6c54a)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Thanks to Pedro Arthur Duarte (pedroarthur.jedi at gmail.com) for help with this bug.
(cherry picked from commit f7455864f2)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
* [3.12] gh-115572: Move `codeobject.replace()` docs to the data model (GH-115631)
(cherry picked from commit 0c80da4c14)
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>
gh-115405: add versionadded tag for co_qualname in code objects documentation (GH-115411)
(cherry picked from commit de07941729)
Co-authored-by: Christophe Papazian <114495376+christophe-papazian@users.noreply.github.com>
A 'single tuple' means 'one tuple, of whatever length.
Remove the unneeded and slightly distracting parenthetical 'singleton' comment.
(cherry picked from commit a1332a99cf)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
datamodel: Fix a typo in ``object.__init_subclass__`` (GH-111599)
(cherry picked from commit a47353d587)
Co-authored-by: InSync <122007197+InSyncWithFoo@users.noreply.github.com>
gh-101100: Fix Sphinx nitpicks in `library/inspect.rst` and `reference/simple_stmts.rst` (GH-113107)
(cherry picked from commit 4b3cb082da)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
gh-101100: Further improve docs on function attributes (GH-113001)
(cherry picked from commit 81a15ea74e)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
gh-101100: Improve documentation for attributes on instance methods (GH-112832)
(cherry picked from commit ed21d0c1f4)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
gh-101100: Fix many easily solvable Sphinx nitpicks in the datamodel docs (GH-112737)
(cherry picked from commit 2f20cafdbf)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
gh-101100: Fix most Sphinx nitpicks in `inspect.rst` (GH-112662)
(cherry picked from commit 45650d1c47)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Augment the list of places where parentheses are
required around assignnment statements. In particular,
'a := 0' and 'a = b := 1' are syntax errors.
(cherry picked from commit 9a2f25d374)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
gh-110631: Fix reST indentation in `Doc/reference` (GH-110708)
Fix wrong indentation in the Doc/reference dir.
(cherry picked from commit 41d8ec5a1b)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Docs: Resolve Sphinx warnings in dis.rst (GH-108476)
- Link to the code objects reference
- Suppress link to deliberately undocumented builtins.__build_class__
- Suppress links for example methods
(cherry picked from commit cb1184280b)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Docs: Datamodel: Merge "Notes on using __slots__" with the parent section (GH-108400)
(cherry picked from commit 7f5b1a0661)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Datamodel: Add headings to the standard type hierarchy (GH-108146)
Dedent content according to the new layout.
(cherry picked from commit 2b7bff0655)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>