Author lemburg
Recipients docs@python, fdrake, lemburg, pitrou, vstinner
Date 2010-06-09.09:06:22
SpamBayes Score 0.0055303
Marked as misclassified No
Message-id <4C0F598D.4000202@egenix.com>
In-reply-to <1276036241.77.0.435177115911.issue8939@psf.upfronthosting.co.za>
Content
STINNER Victor wrote:
> 
> STINNER Victor <victor.stinner@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.
History
Date User Action Args
2010-06-09 09:06:25lemburgsetrecipients: + lemburg, fdrake, pitrou, vstinner, docs@python
2010-06-09 09:06:23lemburglinkissue8939 messages
2010-06-09 09:06:22lemburgcreate