Dennis Lee Bieber wrote: > On Fri, 19 May 2006 14:41:13 +0000, [EMAIL PROTECTED] (Cameron Laird) > declaimed the following in comp.lang.python: . > > Guys, I try--I try *hard*--to accept the BetterToAskForgiveness > > gospel, but this situation illustrates the discomfort I consistently > > feel: how do I know that the NameError means VARIABLE didn't resolve, > > rather than that it did, but that evaluation of commands.VARIABLE() > > I'd suggest that each of your "valid" commands should contain > whatever error checking is appropriate to it -- and if needed, raise > some custom "command failure" exception after handling the real failure > internally.
That probably doesn't help when the exception is due to a bug and not bad input. If you have an AttributeError due to a bug, it would be wrong to raise a custom command failure exception. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list