On Sat, 19 Apr 2008 12:18:47 +1200 Greg Ewing <[EMAIL PROTECTED]> wrote:
> Antoine Pitrou wrote: > > > Why do you want to derive program bugs from EnvironmentError ? Usually I > > derive > > them from ValueError, RuntimeError or simply Exception. > > I'm *not* talking about program bugs, I'm talking about > exceptions due to something the user did wrong. > > I like to be able to do this: > > try: > f = open(somefile) > mungulate(f) > f.close() > except EnvironmentError, e: > big_nasty_alert("Couldn't mungulate: %s" % e) It might help if you explain what sort of actual things that the user does wrong that you are talking about. From where I'm sitting, the only thing I can see that the user could do wrong is specify the wrong file. That doesn't sound like an EnvironmentError to me, but I don't know that it should be a ValueError or TypeError either. -- Steven <[EMAIL PROTECTED]> _______________________________________________ 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