summaryrefslogtreecommitdiffstats
path: root/Doc/reference/datamodel.rst
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-120937: Reference weakref from the `__del__` documentation ↵Miss Islington (bot)2024-06-261-0/+2
| | | | | | | | | (GH-120940) (#121061) 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.13] gh-118934: Fix PyEval_GetLocals docs (PEP 667) (GH-119934)Miss Islington (bot)2024-06-021-2/+2
| | | | | | | | | | | | | | | | PEP 667's description of the planned changes to PyEval_GetLocals was internally inconsistent when accepted, so the docs added for gh-74929 didn't match either the current behaviour or the intended behaviour once gh-118934 is fixed. This PR updates the documentation and 3.13 What's New to match the intended behaviour (once gh-118934 is fixed). It also tidies up lingering references to `f_locals` always being a dictionary (this hasn't been true since at least when custom namespace support for class statement execution was added) (cherry picked from commit fd6cd621e0cce6ba2e737103d2a62b5ade90f41f) Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
* [3.13] gh-100117: Fix inaccuracy in documentation of the CodeObject's ↵Miss Islington (bot)2024-05-311-1/+1
| | | | | | | | co_positions field. (GH-119364) (#119869) 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.13] gh-74929: PEP 667 general docs update (gh-119291)Miss Islington (bot)2024-05-211-1/+1
| | | | | | | | | | | * expand on What's New entry for PEP 667 (including porting notes) * define 'optimized scope' as a glossary term * cover comprehensions and generator expressions in locals() docs * review all mentions of "locals" in documentation (updating if needed) * review all mentions of "f_locals" in documentation (updating if needed) (cherry picked from commit e870c852c0ea96fa4e4569e9c39c7ceb80ce858d) Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
* gh-118465: Add __firstlineno__ attribute to class (GH-118475)Serhiy Storchaka2024-05-061-0/+4
| | | | It is set by compiler with the line number of the first line of the class definition.
* gh-74929: Rudimentary docs for PEP 667 (#118581)Guido van Rossum2024-05-051-1/+6
| | | | | | | | | This is *not* sufficient for the final 3.13 release, but it will do for beta 1: - What's new entry - Updated changelog entry (news blurb) - Mention the proxy for f_globals in the datamodel and Python frame object docs This doesn't have any C API details (what's new refers to the PEP).
* gh-115775: Add whatsnew entry about __static_attributes__ (GH-117909)Irit Katriel2024-04-191-0/+5
| | | | | Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru> Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* Add 'The Python 2.3 Method Resolution Order' (#116435)Hugo van Kemenade2024-04-151-5/+2
|
* Add information about negative indexes to sequence datamodel doc (#110903)Adorilson Bezerra2024-03-251-3/+6
| | | Co-authored by Terry Jan Reedy
* gh-72971: Clarify the special no-TypeError behavior for equality (#110729)Gouvernathor2024-03-031-1/+4
|
* gh-104219: Document that idunders can return NotImplemented (#104220)Gouvernathor2024-03-011-2/+4
| | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* Docs: mark up NotImplemented using the :data: role throughout the docs (#116135)Erlend E. Aasland2024-02-291-9/+9
|
* Erase some unnecessary quotes on data model doc (#113521)Adorilson Bezerra2024-02-251-4/+4
| | | | Thanks to Pedro Arthur Duarte (pedroarthur.jedi at gmail.com) for help with this bug.
* gh-115572: Move `codeobject.replace()` docs to the data model (#115631)Daler2024-02-181-0/+8
|
* gh-115405: add versionadded tag for co_qualname in code objects ↵Christophe Papazian2024-02-131-0/+2
| | | | documentation (#115411)
* gh-114552: Update `__dir__` method docs: it allows returning an iterable ↵Nikita Sobolev2024-02-101-3/+3
| | | | (#114662)
* Fix the confusing "User-defined methods" reference in the datamodel (#114276)cdzhan2024-01-211-1/+1
| | | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* datamodel: Fix a typo in ``object.__init_subclass__`` (#111599)InSync2024-01-121-1/+1
|
* Docs: Amend codeobject.co_lines docs; end number is exclusive (#113970)Ned Batchelder2024-01-121-3/+3
| | | The end number should be exclusive, not inclusive.
* gh-113664: Improve style of Big O notation (GH-113695)Serhiy Storchaka2024-01-101-1/+1
| | | | Use cursive to make it looking like mathematic formulas.
* Document the `co_lines` method on code objects (#113682)Alex Waygood2024-01-031-2/+37
| | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-113313: Note that slice support is not required for all sequences. ↵Raymond Hettinger2023-12-211-3/+3
| | | | (gh-113377)
* Fix typo in datamodel docs (#113314)Rodrigo Girão Serrão2023-12-201-1/+1
| | | Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
* gh-101100: Improve docs on exception attributes (GH-113057)Alex Waygood2023-12-131-1/+2
| | | | | | | | | | | * Improve docs on exception attributes * thanks sphinx-lint * fix doctests * argh, okay, give up on doctests * Various improvements
* gh-101100: Further improve docs on function attributes (#113001)Alex Waygood2023-12-121-3/+6
|
* gh-101100: Improve documentation on function attributes (#112933)Alex Waygood2023-12-111-90/+107
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-101100: Improve documentation of `TracebackType` attributes (#112884)Alex Waygood2023-12-091-21/+39
|
* gh-101100: Improve documentation for attributes on instance methods (#112832)Alex Waygood2023-12-081-25/+52
|
* gh-101100: Improve documentation of code object attributes (#112781)Alex Waygood2023-12-061-30/+84
|
* gh-101100: Properly document frame object attributes (#112735)Alex Waygood2023-12-051-25/+59
|
* gh-101100: Fix many easily solvable Sphinx nitpicks in the datamodel docs ↵Alex Waygood2023-12-051-26/+32
| | | | (#112737)
* gh-101100: Fix most Sphinx nitpicks in `inspect.rst` (#112662)Alex Waygood2023-12-031-0/+2
|
* gh-79932: raise exception if frame.clear() is called on a suspended frame ↵Irit Katriel2023-11-071-1/+6
| | | | (#111792)
* GH-101100: Fix reference warnings for ``__enter__`` and ``__exit__`` (#110112)Adam Turner2023-10-191-3/+3
|
* Docs: Resolve Sphinx warnings in dis.rst (#108476)Erlend E. Aasland2023-08-251-1/+3
| | | | | - Link to the code objects reference - Suppress link to deliberately undocumented builtins.__build_class__ - Suppress links for example methods
* Datamodel: Add headings to the standard type hierarchy (#108146)Adam Turner2023-08-251-1000/+1104
| | | Dedent content according to the new layout.
* Docs: Datamodel: Merge "Notes on using __slots__" with the parent section ↵Adam Turner2023-08-251-2/+1
| | | | (#108400)
* gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386)Serhiy Storchaka2023-07-291-4/+4
|
* gh-106892: Use roles :data: and :const: for referencing module variables ↵Serhiy Storchaka2023-07-211-2/+2
| | | | (GH-106894)
* Fix typo in datamodel.rst (#106587)Riahiamirreza2023-07-101-1/+1
|
* gh-106046: Improve error message from `os.fspath` if `__fspath__` is set to ↵Alex Waygood2023-06-251-2/+3
| | | | `None` (#106082)
* gh-103921: Document PEP 695 (#104642)Jelle Zijlstra2023-05-261-0/+12
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-97950: Use new-style index directive ('builtin') (#104164)Adam Turner2023-05-061-25/+25
| | | | | | | | | | | | | * Uncomment builtin removal in pairindextypes * Use new-style index directive ('builtin') - C API * Use new-style index directive ('builtin') - Extending * Use new-style index directive ('builtin') - Library * Use new-style index directive ('builtin') - Reference * Use new-style index directive ('builtin') - Tutorial
* gh-102500: Document PEP 688 (#102571)Jelle Zijlstra2023-05-041-0/+41
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* GH-97950: Use new-style index directive ('statement') (#104162)Adam Turner2023-05-041-4/+4
|
* GH-97950: Use new-style index directive ('object') (#104158)Adam Turner2023-05-041-44/+44
| | | | | | | | | | | * Uncomment object removal in pairindextypes * Use new-style index directive ('object') - C API * Use new-style index directive ('object') - Library * Use new-style index directive ('object') - Reference * Use new-style index directive ('object') - Tutorial
* GH-97950: Use new-style index directive ('module') (#103996)Adam Turner2023-05-041-4/+4
| | | | | | | | | | | | | | | | | * Use new-style index directive ('module') - C API * Use new-style index directive ('module') - Library * Use new-style index directive ('module') - Reference * Use new-style index directive ('module') - Tutorial * Uncomment module removal in pairindextypes * Use new-style index directive ('module') - C API * Use new-style index directive ('module') - Library * Use new-style index directive ('module') - Reference
* GH-103484: Fix redirected permanently URLs (#104001)Rafael Fontenelle2023-05-021-1/+1
| | | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
* gh-101688: Implement types.get_original_bases (#101827)James Hilton-Balfe2023-04-231-0/+4
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-103373: `__mro_entries__` docs: improve cross references (#103398)Alex Waygood2023-04-111-5/+10
| | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>