
Oct. 17, 2021
3:51 p.m.
17.10.21 16:08, Eric V. Smith пише:
Serhiy: could you explain the difference?
The difference between `for x in it: yield x` and `yield from it` is than in the latter case any values passed in with send() and any exceptions passed in with throw() are passed to the underlying iterator if it has the appropriate methods. See https://www.python.org/dev/peps/pep-0380/ .