summaryrefslogtreecommitdiffstats
path: root/Doc/reference/datamodel.rst
Commit message (Collapse)AuthorAgeFilesLines
* docs: Change links to label refs (#98454)Stanley2022-10-261-0/+2
| | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C type>) (#97768)Adam Turner2022-10-051-1/+1
| | | | | :c:type:`<C type>` -> :c:expr:`<C type>` Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-96348: Deprecate the 3-arg signature of coroutine.throw and ↵Ofey Chan2022-09-301-0/+5
| | | | generator.throw (GH-96428)
* Docs: remove redundant "adverb-adjective" hyphens from compound modifiers ↵Ned Batchelder2022-07-051-2/+2
| | | | | (GH-94551) Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
* bpo-14911: Corrected generator.throw() documentation (GH-32207)Dave Goncalves2022-03-311-1/+2
| | | Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-46013: Fix confusing kerning on period in docs (GH-29989)jmcb2022-03-201-1/+1
|
* Removed ambiguity in __init_subclass__ docs (GH-31540)David Gilbertson2022-03-081-1/+1
|
* bpo-44977: Deprecate delegation of int to __trunc__ (GH-31031)Zackery Spytz2022-02-031-0/+3
| | | | | Calling int(a) when type(a) implements __trunc__ but not __int__ or __index__ now raises a DeprecationWarning.
* bpo-46076: Improve documentation for per-attribute docstrings with ↵Alex Waygood2021-12-191-3/+6
| | | | `__slots__` (GH-30109)
* Fix some false positives of documentation syntax problemsPablo Galindo2021-12-081-1/+1
|
* bpo-20751: Match variable name to the example. (GH-29980)Raymond Hettinger2021-12-081-4/+8
|
* bpo-45840: Improve cross-references in the data model documentation (GH-29633)Alex Waygood2021-12-051-54/+76
|
* bpo-20751: Replace method example with attribute example, matching the ↵Raymond Hettinger2021-12-041-4/+32
| | | | descriptor howto (GH-29909)
* [doc] Clarify MRO precedence in descriptor super binding section (GH-29539)Jouke Witteveen2021-11-201-1/+1
| | | | A similar sentence is present in the 'Invocation from super' section of the descriptor HOWTO, where it is already correct.
* bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently ↵Brett Cannon2021-11-201-14/+12
| | | | | required by CPython (GH-29170) It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`.
* [doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in ↵Alex Waygood2021-11-181-18/+146
| | | | | | | | | | | | | | the data model (GH-29389) The documentation explaining Python's data model does not adequately explain the differences between ``__getitem__`` and ``__class_getitem__``, nor does it explain when each is called. There is an attempt at explaining ``__class_getitem__`` in the documentation for ``GenericAlias`` objects, but this does not give sufficient clarity into how the method works. Moreover, it is the wrong place for that information to be found; the explanation of ``__class_getitem__`` should be in the documentation explaining the data model. This PR has been split off from GH-29335.
* bpo-45583: Correct datamodel documentation of int() (GH-29182)Arthur Milchior2021-10-281-2/+2
| | | | It should be noted that this part of the documentation is redundant with function.rst's documentation of int. This one was correctly updated with Python 3.8.
* [docs] Improve the markup of powers (GH-28598)Serhiy Storchaka2021-09-281-1/+1
|
* bpo-45198: __set_name__ documentation not clear about its usage with ↵Raymond Hettinger2021-09-181-29/+34
| | | | non-descriptor classes (GH-28439)
* bpo-44964: Correct the note about the f_lasti field (GH-28208)Pablo Galindo Salgado2021-09-101-3/+2
|
* bpo-45104: Clarify when __init__ is called (GH-28210)Raymond Hettinger2021-09-071-1/+1
|
* bpo-44964: Add a note explaining the new semantics of f_last_i in frame ↵Pablo Galindo Salgado2021-09-071-2/+3
| | | | objects (GH-28200)
* bpo-41706: Fix special method invocation docs to mention using type() (GH-22084)William Chargin2021-08-041-3/+4
|
* bpo-43950: Add documentation for PEP-657 (GH-27047)Ammar Askar2021-07-131-0/+33
| | | | Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
* bpo-44530: Document the new CodeObject.co_qualname attribute (GH-27052)Pablo Galindo2021-07-071-0/+2
|
* bpo-43216: Remove @asyncio.coroutine (GH-26369)Illia Volochii2021-07-011-1/+1
| | | | | | | | | Remove the @asyncio.coroutine decorator enabling legacy generator-based coroutines to be compatible with async/await code; remove asyncio.coroutines.CoroWrapper used for wrapping legacy coroutine objects in the debug mode. The decorator has been deprecated since Python 3.8 and the removal was initially scheduled for Python 3.10.
* bpo-43987: Add "Annotations Best Practices" HOWTO doc. (#25746)larryhastings2021-05-021-19/+51
| | | Add "Annotations Best Practices" HOWTO doc.
* bpo-42800: add audit hooks for f_code and tb_frame (GH-24182)Ryan Hileman2021-04-291-0/+6
| | | | | | | | | | Accessing the following attributes will now fire PEP 578 style audit hooks as ("object.__getattr__", obj, name): * PyTracebackObject: tb_frame * PyFrameObject: f_code * PyGenObject: gi_code, gi_frame * PyCoroObject: cr_code, cr_frame * PyAsyncGenObject: ag_code, ag_frame Add an AUDIT_READ attribute flag aliased to READ_RESTRICTED. Update obsolete flag documentation.
* Fix a typo in datamodel reference document (GH-24930)Géry Ogam2021-04-251-1/+1
|
* bpo-43682: Make staticmethod objects callable (GH-25117)Victor Stinner2021-04-111-3/+2
| | | Static methods (@staticmethod) are now callable as regular functions.
* Update pattern matching docs for changes to the PEP (#25185)Ken Jin2021-04-061-1/+1
| | | | | See: - https://github.com/python/peps/pull/1909 (__match_args__ must be a tuple) - https://github.com/python/peps/pull/1908 (allow keyword patterns for int(x) etc.)
* bpo-42128: Add documentation for pattern matching (PEP 634) (#24664)Daniel F Moisset2021-03-011-0/+32
| | | | | | | | | This is a first edition, ready to go out with the implementation. We'll iterate during the rest of the period leading up to 3.10.0. Co-authored-by: Carol Willing <carolcode@willingconsulting.com> Co-authored-by: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Brandt Bucher <brandt@python.org> Co-authored-by: Raymond Hettinger <1623689+rhettinger@users.noreply.github.com> Co-authored-by: Guido van Rossum <guido@python.org>
* [doc] Fix a few margins due to bad markup (GH-23619)Andre Delfino2020-12-171-1/+0
|
* bpo-6761: Enhance __call__ documentation (GH-7987)Andre Delfino2020-10-271-1/+1
|
* bpo-41910: specify the default implementations of object.__eq__ and ↵Brett Cannon2020-10-211-6/+8
| | | | | | | object.__ne__ (GH-22874) See Objects/typeobject.c:object_richcompare() for the implementation of this in CPython. Automerge-Triggered-By: GH:brettcannon
* Fix bpo-39416: Change "Numeric" to lower case; an english word, not a class ↵kpinc2020-10-211-1/+1
| | | | | | | | | | | | | | name (GH-22867) This is a trivial fix to [bpo-39416](), which didn't come up until it was already committed ``` Change "Numeric" to "numeric". I believe this is trivial enough to not need an issue or a NEWS entry, although I'm unclear on what branches the original pull request received backports. ``` Automerge-Triggered-By: GH:merwok
* bpo-39416: Document some restrictions on the default string representations ↵kpinc2020-10-211-0/+18
| | | | | | | | | | | | | | | | of numeric classes (GH-18111) [bpo-39416](): Document string representations of the Numeric classes This is a change to the specification of the Python language. The idea here is to put sane minimal limits on the Python language's default representations of its Numeric classes. That way "Marty's Robotic Massage Parlor and Python Interpreter" implementation of Python won't do anything too crazy. Some discussion in the email thread: Subject: Documenting Python's float.__str__() https://mail.python.org/archives/list/python-dev@python.org/thread/FV22TKT3S2Q3P7PNN6MCXI6IX3HRRNAL/
* bpo-41192: Add documentation of undocumented audit events (GH-21308)Saiyang Gou2020-10-201-0/+18
|
* bpo-41584: clarify when the reflected method of a binary arithemtic operator ↵Brett Cannon2020-10-051-7/+8
| | | | is called (#22505)
* bpo-40204: Fix reference to terms in the doc (GH-21865)Victor Stinner2020-08-141-2/+2
| | | | | | | | Sphinx 3 requires to refer to terms with the exact case. For example, fix the Sphinx 3 warning: Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case sensitive match.made a reference to loader instead.
* Fix typo in object.__format__ docs (GH-19504)Heshy Roskes2020-04-261-1/+1
|
* fix comma location in various places (GH-19233)Mathieu Dupuy2020-03-301-1/+1
|
* bpo-39879: Update datamodel docs to include dict ordering (GH-19006)Lahfa Samy2020-03-261-0/+10
| | | Co-authored-by: furkanonder <furkantahaonder@gmail.com>
* bpo-17422: slightly more precise language (GH-18682)Caleb Donovick2020-03-061-1/+1
|
* bpo-35712: Make using NotImplemented in a boolean context issue a ↵MojoVampire2020-03-031-2/+7
| | | | deprecation warning (GH-13195)
* bpo-17422: Language reference should specify restrictions on class namespace ↵ananthan-1232020-02-221-2/+4
| | | | | (#18559) The language reference now specifies restrictions on class namespaces. Adapted from a patch by Ethan Furman.
* bpo-15243: Document __prepare__ as classmethod (GH-17124)alclarks2020-01-251-1/+2
|
* Fix the parameter list of object. _rpow_ (#GH-16477)HongWeipeng2020-01-051-1/+1
|
* bpo-38316: Fix co_stacksize documentation (GH-16983)Batuhan Taşkaya2019-12-151-2/+2
|
* bpo-38524: clarify example a bit and improve formatting (GH-17406)Tal Einat2019-11-281-5/+8
|