[Python-3000] how should we handle changes to the C API?
brett at python.org
Wed Feb 14 19:53:57 CET 2007
On 2/14/07, "Martin v. Löwis" <martin at v.loewis.de> 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
> 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.
More information about the Python-3000