LBYL vs EAFP
ian.g.kelly at gmail.com
Tue Feb 5 06:40:54 CET 2013
On Mon, Feb 4, 2013 at 9:52 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> You seem to be making the
> classic mistake of thinking that exceptions are something to avoid:
Far from it. You've extrapolated a lot more than what I actually
said, and I completely agree with everything you wrote. I was
explaining EAFP as I see it, not advocating it for all circumstances.
Although since you bring it up, I find that the LBYL crowd tends to be
more prone to exception avoidance, e.g. returning None on a failure
rather than raising an exception, whereas the EAFP crowd seems more
likely to just let the original exception propagate up.
More information about the Python-list