[docs] Inconsistent macro documentation
Arthur Kristmann
ak at tml-software.com
Fri Dec 4 08:47:47 EST 2015
Hello everyone,
I'm using the Python C API to make our library available to Python. It's working well, but I found a some inconsistencies in the documentation of macro definitions.
To use the DateTime Objects the documentations states that I need to invoke the macro "PyDateTime_IMPORT" to initialise the datetime module. (https://docs.python.org/3.4/c-api/datetime.html)
I got an error for a missing semicolon and I fix this by adding a semicolon at the end of the macro "PyDateTime_IMPORT;".
Other macros from the same API such as "Py_BEGIN_ALLOW_THREADS" don't need to be close with an semicolon. (https://docs.python.org/3/c-api/init.html#c.Py_BEGIN_ALLOW_THREADS)
At the end of the day it's not a big deal if you know it, but then I would expect that it's documented.
It's actually good to not use default semicolons, because macros like "PyDateTime_GET_YEAR(o)" feels more like a function that needs to be closed at the end. But in this case it would be nice, if you would add semicolons in the documentation when it's needed like in the datetime section.
Thanks for your time.
Best regard,
Arthur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20151204/f8c5290a/attachment-0001.html>
More information about the docs
mailing list