Coding style in CPython implementation
Ned Batchelder
ned at nedbatchelder.com
Sat Oct 28 16:48:13 EDT 2017
On 10/28/17 4:26 PM, Stefan Ram wrote:
> Ned Batchelder <ned at nedbatchelder.com> writes:
>> On 10/28/17 3:00 PM, Stefan Ram wrote:
>>> =?UTF-8?B?zqPPhM6tz4bOsc69zr/PgiDOo8+Jz4bPgc6/zr3Or86/z4U=?= <stefanossofroniou542 at gmail.com> writes:
>>>> What I wanted to ask is, is there a particular reason for not choosing
>>> definition of »NULL«. »NULL« is not part of the C language proper.
>> Especially if NULL is not part of the standard,
> »NULL« is defined in the standard, but it is an identifier
> from the library and, therefore, needs an »#include«.
>
> The language proper is the language core without any
> library added.
>
> The expression »NULL« AFAIK has only the meaning that
> usually is intended if one of the headers needed for
> it has been »#include«d.
>
> The operator »!« and the if-statement do not require
> any »#include«.
>
I certainly wouldn't adjust my coding style to avoid #include'ing the
definition of NULL.
--Ned.
More information about the Python-list
mailing list