This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients docs@python, fdrake, lemburg, pitrou, vstinner
Date 2010-06-09.09:28:30
SpamBayes Score 0.00034066392
Marked as misclassified No
Message-id <201006091128.23447.victor.stinner@haypocalc.com>
In-reply-to <4C0F598D.4000202@egenix.com>
Content
Le mercredi 09 juin 2010 11:06:25, vous avez écrit :
> >  - replace Python types by C Python types (eg. str => PyUnicodeObject*
> >  and None => Py_None)
> 
> I was thinking of e.g. "PyUnicode", not "PyUnicodeObject*".

I don't know PyUnicode, only "unicode" (Python type) or "PyUnicodeObject*" (C 
Python type). :ctype:`PyUnicodeObject*` creates a link in the HTML 
documentation.

> >  - add quotes to the formats, eg. s => "s"
> 
> Why do you put the parser codes in double quotes ?

It's easier to search a format: try to search s or b format in the current 
documentation, you will see :-)

I think that it's also more readable and closer to the "real" source code (eg. 
a call to PyArg_ParseTuple() uses quotes).

> >  - 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.

There are only 2 possible results: 0 or 1.
History
Date User Action Args
2010-06-09 09:28:32vstinnersetrecipients: + vstinner, lemburg, fdrake, pitrou, docs@python
2010-06-09 09:28:31vstinnerlinkissue8939 messages
2010-06-09 09:28:30vstinnercreate