Re:I don’t hire Junior data-scientists
by hooloovoo_zoo on Monday August 12, 2019 @12:55PM
(#20677303)
What's wrong with chaining try/except?
[ Parent
| on HN ]
One or two try/except is usually fine, but when you are nesting 3+ more try/except with the same error, the code becomes quickly unreadable.
Often you would be better off having a first look at the input to figure out which case you should tackle, decompose the nested try/excepts into separate function or at the very least keep it to two nested levels.