On Tue, Sep 7, 2010 at 9:35 PM, Phlip <phlip2...@gmail.com> wrote: > Exceptions are very dangerous by themselves, because if you don't trap > them just right they can cause side-effects.
And returning None on failure is dangerous, because if the programmer does not take care to handle that case, the program may attempt to regard it as actual data. This in turn results in hard-to-track bugs elsewhere in the program, a fate much worse than an unhandled exception. It's better to fail noisily than to fail silently. > They are worse than GOTO. This assertion is questionable at best. Exceptions are structured; goto is unstructured, giving you much more rope to hang yourself with. -- http://mail.python.org/mailman/listinfo/python-list