Comparison with False - something I don't understand

Aahz aahz at pythoncraft.com
Thu Dec 2 20:33:47 EST 2010


In article <mailman.143.1291301807.2649.python-list at python.org>,
Harishankar  <v.harishankar at gmail.com> wrote:
>
>There are some reasons why I hate exceptions but that is a different 
>topic. However, in short I can say that personally:
>
>1. I hate try blocks which add complexity to the code when none is 
>needed. Try blocks make code much more unreadable in my view and I use it 
>only for the built-in exceptions when absolutely needed.
>
>2. I prefer the less irksome True or False to do error checking. 
>Exceptions seem too heavyweight for simple problems.

Please demonstrate that using ``if`` blocks for True/False is impler and
cleaner than using ``try`` blocks to handle exceptions.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Think of it as evolution in action."  --Tony Rand



More information about the Python-list mailing list