The Python Oracle

Why is "except: pass" a bad programming practice?

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: Lost Civilization

--

Chapters
00:00 Question
00:38 Accepted answer (Score 438)
09:32 Answer 2 (Score 277)
10:09 Answer 3 (Score 88)
10:30 Answer 4 (Score 58)
14:16 Thank you

--

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

Accepted answer links:
[ValueError]: http://docs.python.org/3/library/excepti...
[FileNotFoundError]: http://docs.python.org/3/library/excepti...
[IsADirectoryError]: http://docs.python.org/3/library/excepti...
[PermissionError]: http://docs.python.org/3/library/excepti...
[Python 2 idioms]: http://docs.python.org/2/howto/doanddont...
[NameError]: http://docs.python.org/3/library/excepti...
[SyntaxError]: http://docs.python.org/3/library/excepti...
[SystemError]: http://docs.python.org/3/library/excepti...
[Exception]: http://docs.python.org/3/library/excepti...

Answer 4 links:
[Older]: https://bugs.python.org/issue7391
[documentation say]: https://docs.python.org/2.7/howto/doandd...
[exception hierarchy]: https://docs.python.org/library/exceptio...

--

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

--

Tags
#python #exception #errorhandling #trycatch

#avk47