M
mwt
In my latest attempt at some Python code, I've been tempted to write
something in the form of:
try:
[...] #doing some internet stuff
except IOError:
alternate_method_that_doesnt_need_internet()
This works when I try it, but I feel vaguely uneasy about putting
method calls in exception blocks. So tell me, Brave Pythoneers, is this
evil sorcery that I will end up regretting, or is it just plain good
ol' Python magic?
something in the form of:
try:
[...] #doing some internet stuff
except IOError:
alternate_method_that_doesnt_need_internet()
This works when I try it, but I feel vaguely uneasy about putting
method calls in exception blocks. So tell me, Brave Pythoneers, is this
evil sorcery that I will end up regretting, or is it just plain good
ol' Python magic?