logo       

Re: Pyrex exception type checking broken under Python 2.5 (and earlier): msg#00044

python.pyrex

Subject: Re: Pyrex exception type checking broken under Python 2.5 (and earlier)

Stefan Behnel wrote:

> I don't quite buy that argument - it's unlikely that it crashes, at least

Are you sure? That code is based on what the interpreter itself
does for a raise statement, and if it's performing those checks,
there's probably a reason for it.

> What Python 2.5 does is check
> that they inherit from BaseException. Since that's not available in earlier
> versions, what about checking that raised new-style objects ... inherit from
> PyErr_Exception? I find that a reasonable restriction.

Yes, that sounds reasonable. I'll add this to my list.

--
Greg


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise