[Python-Dev] Re: Syntax for "except"
Gerrit
gerrit at nl.linux.org
Wed Feb 11 07:14:15 EST 2004
Edward C. Jones wrote:
> Here is a weak proposal for a generalized type of exception. Since I=20
> know nothing about either language design or implementation, my hope is=
=20
> to trigger some thinking by the experts.
I don't know anything about it either.
> MyError =3D ExceptionList( (ValueError, TypeError) )
> "raise MyError"
> raises an exception that can be handled by any except clause that=20
> handles MyError, ValueError, or TypeError.
> Perhaps MyError could be a class with base classes ValueError and TypeE=
rror.
So where's the need? You can already do:
class MyError(ValueError, TypeError):
...
etc.?
Gerrit.
--=20
Weather: 6=C2=B0C Hail Wednesday 11 February 2004 11:55 Twenthe Netherla=
nds
--=20
PrePEP: Builtin path type
http://people.nl.linux.org/~gerrit/creaties/path/pep-xxxx.html
Asperger's Syndrome - a personal approach:
http://people.nl.linux.org/~gerrit/english/
More information about the Python-Dev
mailing list