The Python Oracle

Python destructor basing on try/finally + yield?

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

--

Track title: CC M Beethoven - Piano Sonata No 3 in C 3

--

Chapters
00:00 Question
02:34 Accepted answer (Score 4)
06:24 Thank you

--

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

Question links:
http://docs.python.org/2/library/context...
[Source link]: http://docs.python.org/2/reference/simpl...

Accepted answer links:
[CPython doesn't actually show ]: https://bugs.python.org/issue17468
[a context manager]: https://docs.python.org/3/library/stdtyp...
[PEP 442]: https://www.python.org/dev/peps/pep-0442/

--

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

--

Tags
#python #garbagecollection #generator #destructor #yield

#avk47