| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
the specified exception type (GH-32027) (GH-32034)
(cherry picked from commit 45833b50f0ccf2abb01304c900afee05b6d01b9e)
|
| |
|
|
|
|
|
| |
(cherry picked from commit 3af68fc77c528d4e7749046cf6e41fd79902e6e6)
Co-authored-by: jmcb <joel.mcbride1@live.com>
Co-authored-by: jmcb <joel.mcbride1@live.com>
|
| |
|
|
|
| |
(cherry picked from commit 28f84c72b6cee145f9c00e9b999656e9a2517e49)
Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit ab014978aef303ac60465c9010505d798dc34df8)
Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-29479)
(cherry picked from commit 50731297a9b6d57eec3b3f89522785b23f7b3e71)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
docs (GH-24663) (GH-30461)
(cherry picked from commit 273cb8e7577d143830404f6779946a0bedb58758)
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Automerge-Triggered-By: GH:iritkatriel
|
| | |
|
| |
|
|
| |
`__slots__` (GH-30109) (GH-30206)
|
| |
|
|
|
| |
(GH-29633) (GH-30077)
(cherry picked from commit c0521fe49fd75e794a38a216813658ab40185834)
|
| |
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
``__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>
|
| |
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 32959108f9c543e3cb9f2b68bbc782bddded6f42)
Co-authored-by: Arthur Milchior <arthur@milchior.fr>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
| |
(cherry picked from commit 0bcc5ade9bff086a0b24d71307fae0a891f4efd2)
Co-authored-by: Christophe Nanteuil <35002064+christopheNan@users.noreply.github.com>
|
| |
|
|
| |
(GH-28698)
|
| |
|
|
|
| |
(cherry picked from commit 4f05f15d7b25ef8b690cb94fdc4c8cb5521a4e27)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
non-descriptor classes (GH-28439)
(cherry picked from commit 94b462686b7dfabbd69cc9401037d736d71c4dc2)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
| |
|
|
|
| |
(cherry picked from commit ab327f2929589407595a3de95727c8ab34ddd4af)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit fa15df77f02ba4a66ba0b71989381a426038be01)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
objects (GH-28200)
(cherry picked from commit fa2c0b85a8d5c9486661083afdf38cbaadb3432a)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-27951) (GH-27963)
(cherry picked from commit 806e25fd3173a80021e6df87b81263b5f6056f38)
Co-authored-by: Objectivitix <79152594+Objectivitix@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 4bd9caafb64589288e5171087070bde726178c58)
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
(cherry picked from commit 3d4b5f1019123a7d74801500eb18ec8fa12136bc)
Co-authored-by: Saiyang Gou <gousaiyang@163.com>
Co-authored-by: Saiyang Gou <gousaiyang@163.com>
|
| |
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
| |
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>
|
| |
|
| |
Footnotes 5 and 6 were in the wrong order.
|
| |
|
| |
Add "Annotations Best Practices" HOWTO doc.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
| |
(GH-25490)
This reverts commits 044a1048ca93d466965afc027b91a5a9eb9ce23c and 1be456ae9d53bb1cba2b24fc86175c282d1c2169, adapting the code to changes that happened after it.
|
| |
|
|
| |
operators first (GH-25469)
|
| | |
|
| |
|
| |
Static methods (@staticmethod) are now callable as regular functions.
|
| | |
|
| | |
|
| |
|
|
| |
arguments (GH-25235)
|
| |
|
|
|
| |
(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.
|
| |
|
|
| |
since 3.9 (GH-25231)
|
| |
|
|
|
| |
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.)
|
| | |
|
| |
|
|
| |
system (GH-25044)
|
| | |
|