When an exception has been assigned using as target, it is cleared at the end of the except clause. This is as if
exceptEasN:foo
was translated to
exceptEasN:try:foofinally:delN
This means the exception must be assigned to a different name to be able to refer to it after the except clause. Exceptions are cleared because with the traceback attached to them, they form a reference cycle with the stack frame, keeping all locals in that frame alive until the next garbage collection occurs.
# réponse 4
Posté par jtremesay (site web personnel) . En réponse au journal le défi du challenge : qu'affiche ce code. Évalué à 10.
d'après la doc, 8.4.1 except clause :