File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
doc/data/messages/u/use-yield-from Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 22requested generator. This enables the caller to directly communicate with the generator (e.g. using :code: `send() `).
33This communication is not possible when manually yielding each element one by one in a loop.
44
5- PEP 380 describes the possibility of adding optimizations specific to :code: `yield from `. It looks like said
6- implementations have not been implemented as of the time of writing. Even without said optimizations, the following
7- snippets shows that :code: `yield from ` is marginally faster.
5+ PEP 380 describes the possibility of adding optimizations specific to :code: `yield from `. It looks like they
6+ have not been implemented as of the time of writing. Even without said optimizations, the following snippet shows
7+ that :code: `yield from ` is marginally faster.
88
99.. code-block :: sh
1010
You can’t perform that action at this time.
0 commit comments