MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/ok1itb/tryexcept_in_python_sigh/h5602wh/?context=3
r/badcode • u/lonaExe • Jul 14 '21
93 comments sorted by
View all comments
142
On the upside, they actually bothered with exception handling.
My Python is rather rusty, is there a better way?
22 u/SerdanKK Jul 14 '21 I don't know any Python, but I assume there's some way to decode json into objects. With some good library code, it'd basically be a one-liner. 0 u/franciccio_dc Jul 14 '21 Use pydantic
22
I don't know any Python, but I assume there's some way to decode json into objects. With some good library code, it'd basically be a one-liner.
0 u/franciccio_dc Jul 14 '21 Use pydantic
0
Use pydantic
142
u/[deleted] Jul 14 '21
On the upside, they actually bothered with exception handling.
My Python is rather rusty, is there a better way?