Antoon Pardon wrote:

> Even this doesn't:
> 
>   def foo():
>     if False:
>       a = 1
>     else:
>       b = a
> 
>   a = 1
>   foo()
> 
> Yet seems to work (which I think is an error in the optimisation;

What definition of 'seems to work' are you using? It throws an 
UnboundLocalError exception so you'll know pretty quickly that something is 
wrong.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to