The Python Oracle

Does 'finally' always execute in Python?

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

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Dreaming in Puzzles

--

Chapters
00:00 Question
00:51 Accepted answer (Score 268)
04:27 Answer 2 (Score 91)
05:57 Answer 3 (Score 15)
06:37 Answer 4 (Score 12)
07:19 Thank you

--

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

Accepted answer links:
[A ]: https://ideone.com/eQZzna
[PEP 342 (Coroutines via Enhanced Generators)]: https://www.python.org/dev/peps/pep-0342/
[A ]: https://ideone.com/T1LBwb
[os._exit]: https://ideone.com/2IWOp6
[execute ]: https://ideone.com/taVknD
[correctly synchronized]: https://docs.python.org/3.5/library/mult...
[fork]: https://docs.python.org/3/library/multip...
[example]: https://ideone.com/KPMg2s

Answer 2 links:
[os._exit]: https://docs.python.org/3/library/os.htm...

Answer 3 links:
[Python documentation]: https://docs.python.org/2.5/whatsnew/pep...

--

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

--

Tags
#python #exceptionhandling #trycatchfinally #finally

#avk47