(setv e (try
(/ 1 0)
(except [e ZeroDivisionError]
e)))
(print e) ; NameError: name 'e' is not defined
This compiles to:
try:
e = 1 / 0
except ZeroDivisionError as e:
e = e
print(e)
We're trying to assign to an outer e in the except block, but that doesn't work, of course. We probably need a temporary variable for this.
@scauligi You may be interested in this, since it involves scoping.