The Python Oracle

What is the purpose of the "send" function on Python generators?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Track title: CC B Schuberts Piano Sonata No 16 D

--

Chapters
00:00 Question
01:05 Accepted answer (Score 229)
02:44 Answer 2 (Score 141)
03:49 Answer 3 (Score 93)
05:05 Answer 4 (Score 42)
07:18 Thank you

--

Full question
https://stackoverflow.com/questions/1930...

Answer 2 links:
[great tutorial]: https://github.com/qingkaikong/blog-1/bl...

Answer 3 links:
[Section 6.15 Evaluation order]: https://docs.python.org/3/reference/expr...
[6.2.9. Yield expressions]: https://docs.python.org/3/reference/expr...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #generator

#avk47