On Wednesday 02 September 2009 03:21:08 Jonathan Lange wrote:
> That's just restating your point in different words. I really want to
> understand the _reason_ for saying so.
Maybe my experience is different to yours, but this is a well-established
programming convention in every place I've done programming work for the last
16 years. I can't find any exceptions (haha) to this convention when using
Google, either. Everything I've found talks about using them only for error
handling. Break strong conventions at your peril.
> > Also bearing in
> > mind that they're pretty expensive, if a piece of code can return a value
> > to indicate its results, then it should do so.
>
> Are they really that expensive in Python?
> http://www.python.org/doc/faq/general/#how-fast-are-exceptions is
> unclear
"Actually executing an exception is expensive" seems clear to me. :)
When you think about what happens, it makes sense.
On Wednesday 02 September 2009 03:21:08 Jonathan Lange wrote:
> That's just restating your point in different words. I really want to
> understand the _reason_ for saying so.
Maybe my experience is different to yours, but this is a well-established
programming convention in every place I've done programming work for the last
16 years. I can't find any exceptions (haha) to this convention when using
Google, either. Everything I've found talks about using them only for error
handling. Break strong conventions at your peril.
> > Also bearing in www.python. org/doc/ faq/general/ #how-fast- are-exceptions is
> > mind that they're pretty expensive, if a piece of code can return a value
> > to indicate its results, then it should do so.
>
> Are they really that expensive in Python?
> http://
> unclear
"Actually executing an exception is expensive" seems clear to me. :)
When you think about what happens, it makes sense.