Raising objects
A. Lloyd Flanagan
alloydflanagan at attbi.com
Wed May 7 10:09:01 EDT 2003
Steven Taschuk <staschuk at telusplanet.net> wrote in message news:<mailman.1051839605.2952.python-list at python.org>...
> Quoth Alex Martelli:
> [...]
> > We probably do need to aim at a world where (except for backwards
> > compatibility) one raises an instance (of some subclass of
> > NewException), period -- getting out of the current "raise klas"
> > equalling "raise klas()" confusion. [...]
>
> After much reflection, I agree with this. The ultimate objective
> should be: raise any instance of (any subclass of) (New)Exception;
> catch e if and only if the except clause names a type of which e
> is an instance.
>
<snip>
> I think the migration path is not difficult, though it will take
> some time; some of it is disruptive enough that it should probably
> occur at the major-version timescale.
>
> Time to write a PEP, I think.
Heck, I'm +1 on the PEP and I haven't even read it yet. Get rid of
the $%#&*@#(* commas, please.
More information about the Python-list
mailing list