why swallow the errors with a print statement? a Pythonic design idea is "crash early and often" i.e. just let the exception happen and get your stack trace so you can debug. handle exceptions where handling it means doing something that doesn't break control flow.
-
-
Replying to @symbolic_undead
this is a bit terse, but has some wisdom in it. also, it's literally built in to the language so consider it semi-official "errors should never pass silently unless explicitly silenced" consider that print statement to be a lesser severity variant of silencing it.pic.twitter.com/Mu5dcUYeyi
1 reply 0 retweets 1 like -
Replying to @symbolic_undead
you're just a beginner, please, that self-deprecation is unnecessary. the instinct to over-engineer is common and good. it means you're identifying problems. identifying appropriate solutions is hard and requires practice.
1 reply 0 retweets 2 likes -
Replying to @danlistensto @symbolic_undead
it requires training and experience to develop a feeling for elegant solutions. some words to internalize for your work "the only code with no bugs is no code". so if you don't have to write code for something, just don't, that includes working with, not against, the language.
1 reply 0 retweets 1 like -
Replying to @danlistensto @symbolic_undead
in Python, working with the language means just let exceptions happen and let the program crash and give you a stacktrace. wrapping things in a try/except block should be done only with specific exceptions (e.g. no except Exception catches, the infamous "Pokemon error handling)
1 reply 0 retweets 0 likes
yeah, that's exactly what I mean by working with the language. where to find more? I'm not the greatest person to ask since I'm basically just a humble webshit "engineer" and not deeply connected in the python language community. check the usual internet spots I guess.
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.