Skip to content

Commit 2a99dac

Browse files
committed
Improve details.rst redaction (i think)
1 parent 886afb4 commit 2a99dac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/data/messages/u/use-yield-from/details.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
:code:`yield from` can be thought of as removing the intermediary (your for loop) between the function caller and the
2-
requested generator. This enables the caller to directly communicate with the generator (e.g. :code:`send()`).
2+
requested generator. This enables the caller to directly communicate with the generator (e.g. using :code:`send()`).
33
This 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`, as of the time of writing,
6-
it can't be confirmed that such optimizations have been implemented. The following snippet still shows that while
7-
probably negligible, a performance improvement can exist simply because of the removed overhead.
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.
88

99
.. code-block:: sh
1010

0 commit comments

Comments
 (0)