[Python-Dev] check for PyUnicode_READY look backwards (original) (raw)

Amaury Forgeot d'Arc amauryfa at gmail.com
Fri Oct 7 00:07:58 CEST 2011


2011/10/6 Benjamin Peterson <benjamin at python.org>:

Why not just have it return 0 on error? This would be more consistent with API functions that return "false" values like NULL and would just be

if (!PyUnicodeREADY(s)) return NULL;

Most functions of the Python C API seems to follow one of two ways to indicate an error:

-- Amaury Forgeot d'Arc



More information about the Python-Dev mailing list