On 8/5/05, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > > When a user creates their own exception for exiting multiple levels > of > > > loops or frames, should they inherit from ControlFlowException on > the > > > theory that it no different in intent from StopIteration or should > they > > > inherit from UserError on the theory that it is a custom exception? > > > > I say ControlFlowException. UserError is meant for quick-and-dirty > > exception usage and not as a base for user error exceptions. If the > > name is confusing it can be changed to SimpleError. > > Gads. It sounds like you're just making this up on the fly. The > process should be disciplined, grounded in use cases, and aimed at > known, real problems with the current hierarchy. >
It is based on a real use case; my own. As I said in another email I just sent, I had no clue that RuntimeError was meant to be used as a generic exception until Guido pointed it out. -Brett _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com