On Wed, Apr 8, 2015 at 7:10 AM, Andrew Barnert email@example.com wrote:
The smaller problem is that in Python, only functions (and classes and modules) have scope; the idea of a name bound "locally" is tricky. There's a bit of hackery around except clauses...
FWIW it's not hackery around scope at all - it's simply that the name gets unbound:
e = 2.71828 try: 1/0
... except ZeroDivisionError as e: print("1/0!") ... 1/0!
Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'e' is not defined