Jun-01-2019, 04:10 AM
while debugging code, often my exception handling obscures what is really going on. i usually have to take the exception handling out. and that is typically a lot of work, especially saving that code or typing it all back in. and, of course, i have to unindent the active code. so what i have done is replace the
try:
with if 1:
and the except:
with if 0:
. but even that is a fair amount of typing to put it in and undo it. my latest thought is to just change the exception being handled to one that mostly never happens (when my code is trying to run). would SyntaxError
be a viable choice (in running code being debugged). the idea is to temporarily be handling an exception that does not happen so that the exception that really does happen is not handled, letting it stop the code and dump the stack.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.