On 10/28/17 3:00 PM, Stefan Ram wrote:
=?UTF-8?B?zqPPhM6tz4bOsc69zr/PgiDOo8+Jz4bPgc6/zr3Or86/z4U=?= 
<stefanossofroniou...@gmail.com> writes:
What I wanted to ask is, is there a particular reason for not choosing
   I am not a CPython developer, but here are my 2 cents about
   the possibilities:

if (variable == NULL) { ... }
if (!variable) { ... }
   »!variable« is clearer, because it does not depend on the
   definition of »NULL«. »NULL« is not part of the C language proper.
Especially if NULL is not part of the standard, then you need to write "variable == NULL", since "!variable" may not have the same effect after "return NULL;" depending on how NULL is defined.

   (I sometimes like to write »if( variable ); else { ... }«.)
Ick.

--Ned.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to