summaryrefslogtreecommitdiffstats
path: root/Doc/reference
Commit message (Collapse)AuthorAgeFilesLines
* bpo-12029: [doc] clarify that except does not match virtual subclasses of ↵Irit Katriel2022-03-212-5/+7
| | | | | the specified exception type (GH-32027) (GH-32034) (cherry picked from commit 45833b50f0ccf2abb01304c900afee05b6d01b9e)
* bpo-46013: Fix confusing kerning on period in docs (GH-29989) (GH-32005)Miss Islington (bot)2022-03-201-1/+1
| | | | | | | (cherry picked from commit 3af68fc77c528d4e7749046cf6e41fd79902e6e6) Co-authored-by: jmcb <joel.mcbride1@live.com> Co-authored-by: jmcb <joel.mcbride1@live.com>
* Removed confusing reference to sys (GH-31638)Miss Islington (bot)2022-03-081-3/+3
| | | | | (cherry picked from commit 28f84c72b6cee145f9c00e9b999656e9a2517e49) Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
* Removed ambiguity in __init_subclass__ docs (GH-31540)Miss Islington (bot)2022-03-081-1/+1
| | | | | (cherry picked from commit ab014978aef303ac60465c9010505d798dc34df8) Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
* bpo-45680: Improve docs on subscriptions w.r.t. `GenericAlias` objects ↵Miss Islington (bot)2022-03-081-20/+30
| | | | | | | (GH-29479) (cherry picked from commit 50731297a9b6d57eec3b3f89522785b23f7b3e71) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.10] bpo-23556: [doc] Fix inaccuracy in documentation for raise without ↵Miss Islington (bot)2022-01-271-8/+10
| | | | | | | | | | args. Improve tests for context in nested except handlers. (GH-29236) (GH-30953) (cherry picked from commit 08c0ed2d9c0d01ad1a5adc0787bc75e4e90cbb85) Co-authored-by: Kinshuk Dua <kinshukdua@gmail.com> Automerge-Triggered-By: GH:iritkatriel
* [3.10] bpo-24650: Use full term "generator function" in yield expressions ↵Miss Islington (bot)2022-01-071-2/+2
| | | | | | | | | | docs (GH-24663) (GH-30461) (cherry picked from commit 273cb8e7577d143830404f6779946a0bedb58758) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> Automerge-Triggered-By: GH:iritkatriel
* bpo-46095: Improve SeqIter documentation. (GH-30316) (GH-30330)Miss Islington (bot)2022-01-011-21/+0
|
* bpo-46076: Improve documentation for per-attribute docstrings with ↵Miss Islington (bot)2021-12-191-3/+6
| | | | `__slots__` (GH-30109) (GH-30206)
* bpo-45840: Improve cross-references in the data model documentation ↵Alex Waygood2021-12-131-54/+76
| | | | | (GH-29633) (GH-30077) (cherry picked from commit c0521fe49fd75e794a38a216813658ab40185834)
* [doc] Clarify MRO precedence in descriptor super binding section (GH-29539) ↵Miss Islington (bot)2021-12-111-1/+1
| | | | | | | | | (GH-29669) A similar sentence is present in the 'Invocation from super' section of the descriptor HOWTO, where it is already correct. (cherry picked from commit ee49484c0f0d0d79e8fc40835da10b78f89ae503) Co-authored-by: Jouke Witteveen <j.witteveen@gmail.com>
* bpo-45619: documentation of execution model: clarify and update binding ↵Miss Islington (bot)2021-11-261-9/+19
| | | | | | | | | | | | | summary (GH-29232) This does two changes that are quite related. 0. it add that variable binding can occur in pattern matching, an update of 3.10 which seems to have been omitted from the list of bindings 1. Given how long the sentence already was, with even subcases in the middle of the sentence, the commit breaks the sentence into an actual list. (cherry picked from commit cd876c84932ecc2f7a6c41f3fc800a34d5b06b95) Co-authored-by: Arthur Milchior <arthur@milchior.fr>
* [3.10] bpo-45250: fix docs regarding `__iter__` and iterators being ↵Brett Cannon2021-11-221-14/+12
| | | | | | | | inconsistently required by CPython (GH-29170) (GH-29650) 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__`. (cherry picked from commit be36e0634060c7d5dee8e8876fb888bbb53d992a) Co-authored-by: Brett Cannon <brett@python.org>
* [3.10] [doc] bpo-45680: Disambiguate ``__getitem__`` and ↵Miss Islington (bot)2021-11-181-18/+146
| | | | | | | | | | | | | | | | | ``__class_getitem__`` in the data model (GH-29389) (GH-29620) 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. (cherry picked from commit 31b3a70edb1216bdc8fab3b2eafd8ddb00487f41) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-45640: [docs] Tokens are now clickable (GH-29260) (GH-29621)Miss Islington (bot)2021-11-183-53/+53
| | | | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 32959108f9c543e3cb9f2b68bbc782bddded6f42) Co-authored-by: Arthur Milchior <arthur@milchior.fr>
* bpo-45583: Correct datamodel documentation of int() (GH-29182) (GH-29285)Miss Islington (bot)2021-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. (cherry picked from commit d9c1868c25ec6466e8d8ae21fe9315a8a03836ab) Co-authored-by: Arthur Milchior <arthur@milchior.fr>
* [3.10]bpo-45463: Clarify that global statements allows multiple names ↵Miss Islington (bot)2021-10-161-4/+4
| | | | | | | | | | | | | | (GH-28851) (GH-28989) The global statement allows specifying a list of identifiers (https://docs.python.org/3/reference/simple_stmts.htmlGH-the-global-statement). The "Execution model" chapter described the global statement as if it only allowed one single name. Pluralize "name" in the appropriate places. (cherry picked from commit 4ecd119b007cb766b8bede2dc78b70d29cd932dd) Co-authored-by: Luca Chiodini <luca@chiodini.org> Co-authored-by: Luca Chiodini <luca@chiodini.org>
* [docs] lexical_analysis: Expand the text on ``_`` (GH-28903) (GH-28933)Miss Islington (bot)2021-10-131-4/+16
| | | | | | | | | | | | | | | | Also: * Expand the discussion into its own entry. (Even before this, text on ``_`` was longet than the text on ``_*``.) * Briefly note the other common convention for `_`: naming unused variables. Co-authored-by: Brandt Bucher <brandtbucher@gmail.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 3dee0cb6217db326e844955a7f8b424c67990557) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Fix class pattern docs to refer to class patterns (GH-28849)Miss Islington (bot)2021-10-101-1/+1
| | | | | (cherry picked from commit 0bcc5ade9bff086a0b24d71307fae0a891f4efd2) Co-authored-by: Christophe Nanteuil <35002064+christopheNan@users.noreply.github.com>
* bpo-45346: Keep docs consistent regarding true and false values (GH-28697) ↵Miss Islington (bot)2021-10-021-4/+4
| | | | (GH-28698)
* [3.10] [docs] Improve the markup of powers (GH-28598) (GH-28607)Łukasz Langa2021-09-281-1/+1
| | | | | (cherry picked from commit 4f05f15d7b25ef8b690cb94fdc4c8cb5521a4e27) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.10] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28511)Łukasz Langa2021-09-211-1/+1
| | | | | | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 8f943ca25732d548cf9f0b0393ba8d582fb93e29) Co-authored-by: Mohamad Mansour <66031317+mohamadmansourX@users.noreply.github.com>
* bpo-45198: __set_name__ documentation not clear about its usage with ↵Miss Islington (bot)2021-09-181-29/+34
| | | | | | | non-descriptor classes (GH-28439) (cherry picked from commit 94b462686b7dfabbd69cc9401037d736d71c4dc2) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* bpo-44964: Correct the note about the f_lasti field (GH-28208) (GH-28276)Miss Islington (bot)2021-09-101-3/+2
| | | | | (cherry picked from commit ab327f2929589407595a3de95727c8ab34ddd4af) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-45104: Clarify when __init__ is called (GH-28210)Miss Islington (bot)2021-09-071-1/+1
| | | | | (cherry picked from commit fa15df77f02ba4a66ba0b71989381a426038be01) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* bpo-44964: Add a note explaining the new semantics of f_last_i in frame ↵Miss Islington (bot)2021-09-071-2/+3
| | | | | | | objects (GH-28200) (cherry picked from commit fa2c0b85a8d5c9486661083afdf38cbaadb3432a) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-45003: Change __div__ to __truediv__ in py3 language reference. ↵Miss Islington (bot)2021-08-261-1/+1
| | | | | | | | (GH-27951) (GH-27963) (cherry picked from commit 806e25fd3173a80021e6df87b81263b5f6056f38) Co-authored-by: Objectivitix <79152594+Objectivitix@users.noreply.github.com>
* bpo-39452: Rewrite and expand __main__.rst (GH-26883)Miss Islington (bot)2021-08-241-0/+2
| | | | | | | | | | Broadened scope of the document to explicitly discuss and differentiate between ``__main__.py`` in packages versus the ``__name__ == '__main__'`` expression (and the idioms that surround it), as well as ``import __main__``. Co-authored-by: Géry Ogam <gery.ogam@gmail.com> Co-authored-by: Éric Araujo <merwok@netwok.org> Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 7cba23164cf82f6619db002cd30021b5dfb1f809) Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
* bpo-41911: Update docs for various expressions (GH-27470) (GH-27490)Miss Islington (bot)2021-07-301-7/+34
| | | | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 4bd9caafb64589288e5171087070bde726178c58) Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
* [3.10] bpo-44589: raise a SyntaxError when mapping patterns have duplicate ↵Miss Islington (bot)2021-07-151-4/+5
| | | | | | | | | | literal keys (GH-27131) (GH-27157) (cherry picked from commit 2693132292b2acf381ac6fa729bf3acf41d9d72b) Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com> Automerge-Triggered-By: GH:brandtbucher
* Update doc as relative import can be used with star import (GH-25667) (GH-26121)Miss Islington (bot)2021-05-141-1/+1
| | | | | | | (cherry picked from commit 3d4b5f1019123a7d74801500eb18ec8fa12136bc) Co-authored-by: Saiyang Gou <gousaiyang@163.com> Co-authored-by: Saiyang Gou <gousaiyang@163.com>
* bpo-43977: Update pattern matching language reference docs (GH-25917) (GH-26117)Miss Islington (bot)2021-05-141-7/+35
| | | | | | | | | | * Update patma language reference with new changes to sequence and mapping * update 3.10 whatsnew too (cherry picked from commit 53c91ac5253bf1cb3cb20e1345e798a53f4c3517) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-44025: Clarify when '_' is a keyword. (GH-25873)Miss Islington (bot)2021-05-041-2/+4
| | | | | | | | In match statements, in case patterns and nowhere else. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit 3b200b2aa648fcc8a2673871807c1463afe00195) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-43990: Fix the footnote ordering in the operator precedence docs (GH-25805)Zackery Spytz2021-05-021-3/+3
| | | Footnotes 5 and 6 were in the wrong order.
* 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-38605: Revert making 'from __future__ import annotations' the default ↵Pablo Galindo2021-04-212-5/+12
| | | | | | (GH-25490) This reverts commits 044a1048ca93d466965afc027b91a5a9eb9ce23c and 1be456ae9d53bb1cba2b24fc86175c282d1c2169, adapting the code to changes that happened after it.
* bpo-43837: Reverse order of precedence table to show tightly binding ↵Ammar Askar2021-04-191-29/+29
| | | | operators first (GH-25469)
* Use double quotes over single quotes for match statement grammar (GH-24943)Ken Jin2021-04-121-2/+2
|
* bpo-43682: Make staticmethod objects callable (GH-25117)Victor Stinner2021-04-111-3/+2
| | | Static methods (@staticmethod) are now callable as regular functions.
* Fix description of behaviour of an exception class in 'from' clause (GH-24303)Mark Dickinson2021-04-111-4/+7
|
* bpo-39702: Remove dotted_name from decorator documentation (GH-25234)Saiyang Gou2021-04-081-1/+0
|
* bpo-36540: Improve doc of function definition regarding positional-only ↵Saiyang Gou2021-04-071-2/+8
| | | | arguments (GH-25235)
* bpo-38605: Update "Future statements" docs since PEP 563 is always enabled ↵Saiyang Gou2021-04-071-5/+2
| | | | | (GH-25236) Update documentation section for "Future statements" to reflect that `from __future__ import annotations` is on by default, and no features require using the future statement now.
* bpo-43755: Update docs to reflect that lambda is not allowed in `comp_if` ↵Saiyang Gou2021-04-061-3/+1
| | | | since 3.9 (GH-25231)
* Update pattern matching docs for changes to the PEP (#25185)Ken Jin2021-04-062-3/+3
| | | | | 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-43672: raise ImportWarning when calling find_loader() (GH-25119)Brett Cannon2021-04-021-1/+2
|
* bpo-42134: Raise ImportWarning when calling find_module() in the import ↵Brett Cannon2021-03-301-0/+11
| | | | system (GH-25044)
* bpo-42136: Deprecate module_repr() as found in importlib (GH-25022)Brett Cannon2021-03-261-0/+7
|