On Thu, Oct 6, 2011 at 10:31 AM, Ronald Oussoren <ronaldousso...@mac.com> wrote:
> On 6 Oct, 2011, at 14:57, Amaury Forgeot d'Arc wrote:
>> I'd prefer it was written :
>>       if (PyUnicode_READY(*filename) < 0)
>> because "< 0" clearly indicates an error condition.
>> That's how all calls to PyType_Ready are written, for example.
>>
>> Am I the only one to be distracted by this idiom?
>
> I prefer the '< 0' variant as well, for the same reason as you.

+1 here as well.

The Unix/C "0 as success" idiom breaks my Python conditioned brain, so
including the explicit "< 0" in the C code helps resolve that
impedance mismatch.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to