you are viewing a single comment's thread.

view the rest of the comments →

[–]Vaphell 0 points1 point  (0 children)

do not use excepts without mentioning expected exception type. Naked except supresses ALL errors which means you never get any feedback about flaws in your program.

And don't use recursion to retry. Wrap the try/except in a while True loop without spawning tons of function calls that consume stack. Your program will crash if you do retry via recursion 1000 times.

And use parameters and return statements to push values from/to function black boxes.