r/badcode • • Jul 14 '21

python Try/Except in Python - Sigh

Post image
662 Upvotes

93 comments sorted by

View all comments

Show parent comment

14

u/AchillesDev Jul 14 '21

That exists, it’s called defaultdict.

5

u/schmidlidev Jul 14 '21

Not for deeply nested stuff.

Python just needs optional chaining.