All right,
I\'ve seen this multiple times in the past, but most recently with my question here. So, I\'m curious why this is the case, in python because gen
Using try blocks for flow control all the time could produce code like this:
try:
# stuff
try:
if userCondition:
throw NeedToDoSomethingElseException
try:
# stuff
except NeedToDoSomethingElseException:
# other stuff
except NeedToDoSomethingElseException:
# other stuff
except NeedToDoSomethingElseException:
# other stuff
Performance concerns aside, this is not very elegant. So, sometimes it's perfectly appropriate to use try, but not for everything.