<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
tt
{mso-style-priority:99;
font-family:"Courier New";}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.pre
{mso-style-name:pre;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB">Hello everyone,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">To use the DateTime Objects the documentations states that I need to invoke the macro "</span><span class="pre"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New"">PyDateTime_IMPORT"
</span></span><span class="pre"><span lang="EN-GB">to initialise the datetime module. (https://docs.python.org/3.4/c-api/datetime.html)
<o:p></o:p></span></span></p>
<p class="MsoNormal"><span class="pre"><span lang="EN-GB"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span class="pre"><span lang="EN-GB">I got an error for a missing semicolon and I fix this by adding a semicolon at the end of the macro
</span></span><span lang="EN-GB">"</span><span class="pre"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New"">PyDateTime_IMPORT;".<o:p></o:p></span></span></p>
<p class="MsoNormal"><span class="pre"><span lang="EN-GB">Other macros from the same API such as "</span></span><tt><span lang="EN-GB" style="font-size:10.0pt">Py_BEGIN_ALLOW_THREADS"
</span></tt><span class="pre"><span lang="EN-GB">don't need to be close with an semicolon. (https://docs.python.org/3/c-api/init.html#c.Py_BEGIN_ALLOW_THREADS)<o:p></o:p></span></span></p>
<p class="MsoNormal"><span class="pre"><span lang="EN-GB">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.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span class="pre"><span lang="EN-GB"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span class="pre"><span lang="EN-GB">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.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span class="pre"><span lang="EN-GB"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span class="pre"><span lang="EN-GB">Thanks for your time.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span class="pre"><span lang="EN-GB"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><span class="pre"><span lang="EN-GB">Best regard,<o:p></o:p></span></span></p>
<p class="MsoNormal"><span class="pre"><span lang="EN-GB">Arthur<o:p></o:p></span></span></p>
</div>
</body>
</html>