On 2/12/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Brett Cannon schrieb:
> >> I'm unclear why you want to warn in PyErr_GivenExceptionMatches:
> >> shouldn't you rather warn when the exception is raised?
> >>
> >
> > Guido wants both so that you don't end up with useless values in the
> > 'except' clause.  So yes, things are checked at the time of raising an
> > exception, but that does not prevent someone from putting something in
> > an 'except' clause that is useless.
>
> Ok: but why does this check need to happen in PyErr_GivenExceptionMatchs?
>

It doesn't need to, it just would have been convenient and consistent.
  It seems odd that C code can compare an exception against other
objects that an 'except' clause won't.

> The deprecation of string exceptions already happens in cmp_outcome;
> if you check for bad base exceptions there also, you would find them
> all, no?

It wouldn't be checked in both places, just PyErr_GivenExceptionMatches().

-Brett
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to