In article <[email protected]>,
Tim Rowe  <[email protected]> wrote:
>
>The point is that an exception causes a change in program flow, so of
>course they're used for flow control. It's what they do. The question
>is in what cases it's appropriate to use them.

Standard Python idiom:

try:
    d[key] += value
except KeyError:
    d[key] = value

Maybe you need to re-think "appropriate".
-- 
Aahz ([email protected])           <*>         http://www.pythoncraft.com/

"To me vi is Zen.  To use vi is to practice zen.  Every command is a
koan.  Profound to the user, unintelligible to the uninitiated.  You
discover truth everytime you use it."  [email protected]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to