In article <mailman.1589.1255781573.2807.python-l...@python.org>,
Tim Rowe  <digi...@gmail.com> 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 (a...@pythoncraft.com)           <*>         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."  --re...@lion.austin.ibm.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to