MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/ok1itb/tryexcept_in_python_sigh/h56n3xu/?context=3
r/badcode • u/lonaExe • Jul 14 '21
93 comments sorted by
View all comments
Show parent comment
2
It would be better to just create a list of properties you need with their default values and then iterate over the list using try/catch. That way it’s more extensible and easier to maintain in the future without blowing up your code debt.
View all comments
Show parent comment
2
u/jabarr Jul 14 '21
It would be better to just create a list of properties you need with their default values and then iterate over the list using try/catch. That way it’s more extensible and easier to maintain in the future without blowing up your code debt.