On Thu, 02 Dec 2010 17:33:47 -0800, Aahz wrote: > Please demonstrate that using ``if`` blocks for True/False is impler and > cleaner than using ``try`` blocks to handle exceptions.
It is my personal preference and coding style for certain situations I encounter in my own programs and not something that I could prove to anybody else by theory. But anyway, in certain circumstances, exceptions create a break in flow of the execution of a program that makes it non-obvious as to how to resume flow at the point of disruption especially when the exception handling mechanism is at a higher level. While an error flag can simply set an alarm and allow other code to continue and allow the calling higher-level code to handle the alarm/flag as it sees fit. -- Harishankar (http://harishankar.org http://lawstudentscommunity.com) -- http://mail.python.org/mailman/listinfo/python-list