[Python-ideas] why not try without except?

Steven D'Aprano steve at pearwood.info
Sun Apr 26 11:05:01 CEST 2009

On Sun, 26 Apr 2009 06:51:08 pm spir wrote:

> Now I realise that what I miss is a kind of handy, clear, and not
> misuseable idiom for coping with undefined
> variables/attributes/parameters. 

The best way to deal with undefined variables is to make sure that there 
never are any. In other words: an undefined variable is a bug. Fix the 
bug, don't hide it.

Steven D'Aprano

More information about the Python-ideas mailing list