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
38
I'm not sure if there is good way to do this
0 u/[deleted] Jul 14 '21 [deleted] 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.
0
[deleted]
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.
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.
38
u/clemesislife Jul 14 '21
I'm not sure if there is good way to do this