Marc-Andre Lemburg <m...@egenix.com> added the comment: STINNER Victor wrote: > > STINNER Victor <victor.stin...@haypocalc.com> added the comment: > > Big patch: > - replace Python types by C Python types (eg. str => PyUnicodeObject* and > None => Py_None)
I was thinking of e.g. "PyUnicode", not "PyUnicodeObject*". > - add quotes to the formats, eg. s => "s" Why do you put the parser codes in double quotes ? > - use :ctype: to add links to some terms (eg. Py_BEGIN_ALLOW_THREADS) and > use a fixed width font > - replace "the default encoding" by "'utf-8' encoding" > - replace true by 1, and false by 0 (C API of Python doesn't use stdbool.h > but classic int) That's not necessarily correct: true in C means non-zero. Only false equates to 0. You can however, make that change if the function actually does always return 1. In general, most C functions in Python use these integer return values: 1 - success 0 - no success -1 - error Some of them also return a positive integer >1 for success or a negative integer <-1 for error, but those are exceptions. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8939> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com