[Python-checkins] r62787 - python/trunk/Lib/warnings.py

Benjamin Peterson musiccomposition at gmail.com
Thu May 8 00:41:29 CEST 2008


On Wed, May 7, 2008 at 2:03 PM, Brett Cannon <brett at python.org> wrote:
>  No, the C fix is right; I screwed up and forgot to return the NULL to
>  have the exception propagate. The C code's check is that way because
>  it is the only reliable way to check for the 'line' argument (unless
>  you can come up with a better way) directly. The other option would be
>  to have PyObject_CallFunctionObjArgs() happen and if it throws a fit
>  because it didn't get something callable to let that exception
>  propagate.
>
>  I just tend to use LBYL in C and EAFP in Python.

Fair enough. I'll revert the Python one. We're not in a freeze now are we?


-- 
Cheers,
Benjamin Peterson


More information about the Python-checkins mailing list