On 2/14/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Brett Cannon schrieb: > > 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. > > If you look at the C code, you find that there are very few callers > to GivenExceptionMatches (even if you also count ExceptionMatches > callers), and they either pass a PyExc_ object (which will automatically > be permitted), or one of their own exceptions. If you were to remove > PyErr_GivenExceptionMatches, and replace it with something else > where > a) people have to change the functions in their code, and
Which is why this was a Py3K question. > b) have to check the return value for errors (which they can > statically determine to never happen) > I think the authors would be unhappy about this gratuitous change. > Well, I happen to not think it is gratuitous, but I think we are just going to agree to disagree on this one. =) > >> 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(). > > Please don't. I'm not. At this point I am not going to bother to touch anything and just continue forward with how I did things in 2.6. -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
