| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
a asynchronous generator -> an asynchronous generator
(cherry picked from commit a9655b7f71b8976c369160ef362d0e706cfcd8c9)
Co-authored-by: Windson yang <wiwindson@outlook.com>
|
|
|
|
|
|
|
|
| |
... by removing a superfluous "either".
Reported by Никита Люшненко on docs@.
(cherry picked from commit 98b976a2f82ba5f50cf6846338f644ca6c64f47d)
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit cf2c5e8e2867e41d34079b2e464bbbe653fb7981)
Co-authored-by: Andrés Delfino <adelfino@gmail.com>
|
|
|
|
|
|
| |
Mention that it can be triggered by triple quotes and after specifying decorators.
(cherry picked from commit 68680035143a3a6398faa88f067f244c74691d19)
Co-authored-by: Andrés Delfino <adelfino@gmail.com>
|
|
|
|
|
|
|
| |
" ... access to elements is O(1)."
(cherry picked from commit 7469ff5017ec315a81e35913f19a32f0dbdf712e)
Co-authored-by: Andrés Delfino <adelfino@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit d689f976199d2e211a97d526b57cfa9871cc578d)
Co-authored-by: Andrés Delfino <adelfino@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-6829) (GH-7128)
* [3.6] bpo-32769: A new take on annotations/type hinting glossary entries (GH-6829).
(cherry picked from commit 6e33f810c9e3a549c9379f24cf1d1752c29195f0)
Co-authored-by: Andrés Delfino <adelfino@gmail.com>
* Typo fix spotted by Guido
|
|
|
|
|
| |
(cherry picked from commit 268cc7c3f8f58075b42ff0cd6b6c6c5d76044895)
Co-authored-by: Andrés Delfino <adelfino@gmail.com>
|
|
|
|
|
|
|
| |
also" style. (GH-6991)
(cherry picked from commit 0c4be82890858f874ff2158b0fcfdb8f261569c0)
Co-authored-by: Andrés Delfino <adelfino@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit d5f144260886959c1fe06bc4506a23fd10f92348)
Co-authored-by: Andrés Delfino <adelfino@gmail.com>
|
|
|
|
|
|
|
|
| |
(#4929)
* Fix GH-32377: improve __del__ docs and fix mention about resurrection
* Mention that CPython only calls __del__ once.
(cherry picked from commit 4b965930e8625f77cb0e821daf5cc40e85b45f84)
|
|
|
| |
(cherry picked from commit 0bf287b6e0a42877b06cbea5d0fe6474d8061caa)
|
|
|
| |
(cherry picked from commit 64c887ab3a400cf91bde4f0c5ef69eacc88bc5e1)
|
|
|
| |
(cherry picked from commit 33db068dac7686e37736f7ecf8abb2aee0345cf2)
|
|
|
| |
(cherry picked from commit c611a5b1d4fab0123bf622f06c3bfa510221dc32)
|
| |
|
|
|
|
| |
Patch by Eric Appelt.
|
|
|
|
| |
Patch by Ivan Levkivskyi.
|
|
|
|
|
|
|
|
|
| |
As part of the update, the documentation was updated to normalize
around the term "virtual environment" instead of relying too heavily
on "venv" for the same meaning and leading to inconsistent usage of
either.
Thanks to Steve Piercy for the patch.
|
|
|
|
| |
Thanks to Dusty Phillips for the initial patch.
|
|\ |
|
| | |
|
|/
|
|
| |
positional-only and keyword parameters in the same function.
|
| |
|
|
|
|
| |
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
|
| |
|
|
|
|
|
| |
Thanks to Raúl Cumplido for the bug report and Thomas Kluyver for the
patch.
|
|\ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Also change glossary heading from view
|
| |
| |
| |
| | |
Patch by Martin Panter.
|
| |
| |
| |
| | |
Patch by Martin Panter.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Summary of changes:
1. Coroutines now have a distinct, separate from generators
type at the C level: PyGen_Type, and a new typedef PyCoroObject.
PyCoroObject shares the initial segment of struct layout with
PyGenObject, making it possible to reuse existing generators
machinery. The new type is exposed as 'types.CoroutineType'.
As a consequence of having a new type, CO_GENERATOR flag is
no longer applied to coroutines.
2. Having a separate type for coroutines made it possible to add
an __await__ method to the type. Although it is not used by the
interpreter (see details on that below), it makes coroutines
naturally (without using __instancecheck__) conform to
collections.abc.Coroutine and collections.abc.Awaitable ABCs.
[The __instancecheck__ is still used for generator-based
coroutines, as we don't want to add __await__ for generators.]
3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to
allow passing native coroutines to the YIELD_FROM opcode.
Before this change, 'yield from o' expression was compiled to:
(o)
GET_ITER
LOAD_CONST
YIELD_FROM
Now, we use GET_YIELD_FROM_ITER instead of GET_ITER.
The reason for adding a new opcode is that GET_ITER is used
in some contexts (such as 'for .. in' loops) where passing
a coroutine object is invalid.
4. Add two new introspection functions to the inspec module:
getcoroutinestate(c) and getcoroutinelocals(c).
5. inspect.iscoroutine(o) is updated to test if 'o' is a native
coroutine object. Before this commit it used abc.Coroutine,
and it was requested to update inspect.isgenerator(o) to use
abc.Generator; it was decided, however, that inspect functions
should really be tailored for checking for native types.
6. sys.set_coroutine_wrapper(w) API is updated to work with only
native coroutines. Since types.coroutine decorator supports
any type of callables now, it would be confusing that it does
not work for all types of coroutines.
7. Exceptions logic in generators C implementation was updated
to raise clearer messages for coroutines:
Before: TypeError("generator raised StopIteration")
After: TypeError("coroutine raised StopIteration")
|
| | |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
- clarified the distinction between text encodings and other codecs
- clarified relationship with builtin open and the io module
- consolidated documentation of error handlers into one section
- clarified type constraints of some behaviours
- added tests for some of the new statements in the docs
|
| |
| |
| |
| | |
interpreter shutdown.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|