exceptions == errors?

Jim Meyer jmeyer at pdi.com
Tue Apr 8 14:16:46 EDT 2003


On Tue, 2003-04-08 at 10:26, Roy Smith wrote:
> Jim Meyer  <jmeyer at pdi.com> wrote:
> >It's always been my impression that exceptions impose considerable
> >performance overhead and therefore should be used to handle only the
> >truly exceptional cases; for any predictable case, one should perform
> >validation and/or error-handling outside the exception mechanism. 
> >
> >[BTW, I picked up this habit after reading "Effective C++" by Scott
> >Meyers, a book I cannot recommend highly enough. =]
> 
> "Effective C++" is indeed an excellent book for improving your C++
> code.  But why would you think it would teach you anything about
> improving your Python code?  Most of the book is very C++ specific.

I wouldn't think such (and don't =). The two weren't intended to
directly relate; I apologize for causing you to infer otherwise. =]

The first paragraph you quoted relates to benchmarking I'd done some
time ago (mentioned in a portion of the same posting not included in
your quotation of it). The second bit you quoted relates to the bit of
Mark Harrison's original posting (also quoted in my original post)
regarding there being "the same feeling as in C++ that exceptions can be
used for non-error situations".

Sorry for the confusion!

--j
-- 
Jim Meyer, Geek at Large                                  jmeyer at pdi.com






More information about the Python-list mailing list