Python doesn't follow it's own scoping rules?
Michael Hudson
mwh21 at cam.ac.uk
Thu Dec 2 02:32:08 EST 1999
Tim Danner <tdanner at drpepper.baker.rice.edu> writes:
> Apologies - I didn't find the answer in the Language Reference, so I gave
> up. After posting this, I thought to look in the *tutorial*, and it was quite
> clearly explained. I should have written:
FWIW, with Python 1.5.2+ (i.e. from CVS):
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "<stdin>", line 2, in death_and_destruction
UnboundLocalError: a
which makes rather more sense!
Cheers,
Michael
More information about the Python-list
mailing list