Steve Holden wrote:

>> access it, and catch the NameError:
>>
>>     try:
>>         variable
>>     except NameError:
> 
> In a function when accessing a not-yet-bound local variable you may also 
> (as Fredrik knows but didn't bother to say) see an UnboundLocalError 
> exception,

 >>> issubclass(UnboundLocalError, NameError)
True

 >>> # muhaha!

</F>

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to