rules in xeven with the new as syntaxthe variable is still available after the except block in in xv is not available laterand is in fact forcibly deleted the try else clause the purpose of the else clause is not always immediately obvious to python newcomers without itthoughthere is no direct way to tell (without setting and checking boolean flagswhether the flow of control has proceeded past try statement because no exception was raisedor because an exception occurred and was handled either waywe wind up after the trytryrun code except indexerrorhandle exception did we get here because the try failed or notmuch like the way else clauses in loops make the exit cause more apparentthe else clause provides syntax in try that makes what has happened obvious and unambiguoustryrun code except indexerrorhandle exception elseno exception occurred you can almost emulate an else clause by moving its code into the try blocktryrun code no exception occurred except indexerrorhandle exception this can lead to incorrect exception classificationsthough if the "no exception occurredaction triggers an indexerrorit will register as failure of the try block and erroneously trigger the exception handler below the try (subtlebut true!by using an explicit else clause insteadyou make the logic more obvious and guarantee that except handlers will run only for real failures in the code you're wrapping in trynot for failures in the else no-exception case' action exampledefault behavior because the control flow through program is easier to capture in python than in englishlet' run some examples that further illustrate exception basics in the context of larger code samples in files exception coding details