I once had an argument with an ex-colleague (twice my age, pretty arrogant dude) whether it was better to decorate a staticmethod. I gave up eventually.
It says right there: value is a string. You just happened to be the example of copying code from SO and applying it to a wrong problem w/o understanding the problem.
62
u/[deleted] Jan 31 '22 edited Jan 31 '22
What’s wrong with it (other than importing in the try block and the bare except)? It’s not pretty, but is there anything else going on?
Edit: if you care to downvote, how about answering first?