[py-dev] py.test error with cygwin update
David Stanek
dstanek at dstanek.com
Tue Jul 19 19:33:23 CEST 2005
Hello,
> 1) it was the easiest fix
> 2) it retains the 'errno' in the classname in order to allow
> catching them specifically (which might make sense if you
> writing a one-shot script and do want to catch a specific
> error
> 3) An UnknownErrno-base class seems like overdoing it since catching
> such errors would not be very specific, and you can do
> "except py.error.Error, e: ..." anyway.
>
Makes sense. I cannot think of a use-case now, but I thought maybe there
would be a reason to catch all UnknownErrno## classes without catching all
py.error.Error subclasses. If you do catch all Error classes you would
have to evaluate the e.__class__.__name__ to see if it begins with
"UnknownErrno".
Don't mind me, it's probably just my tendency to overdesign :-)
Regards,
David
More information about the py-dev
mailing list