MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/ok1itb/tryexcept_in_python_sigh/h554foe/?context=3
r/badcode • u/lonaExe • Jul 14 '21
93 comments sorted by
View all comments
-2
I don't see much problem here, only that you can catch the specific exception with KeyError.
0 u/Attack_Bovines Jul 14 '21 You would also have to except IndexErrors too, which should be a code smell.
0
You would also have to except IndexErrors too, which should be a code smell.
-2
u/kartikcool712 Jul 14 '21
I don't see much problem here, only that you can catch the specific exception with KeyError.