Coding style in CPython implementation
Dan Sommers
dan at tombstonezero.net
Sat Oct 28 22:18:04 EDT 2017
On Sat, 28 Oct 2017 16:20:54 -0700, Στέφανος Σωφρονίου wrote:
> I do believe though that if (!d) is a lot clearer than if (d == NULL)
> as it is safer than falsely assigning NULL in d, by pure mistake.
Having made my living writing C code for a very long time, I always
found if (!d) *harder* to read, especially if it happened to be written
if(!d) without the space, because it was never a single character name
the ! disappeared into the noise. OTOH, = vs. == always stuck out like
a sore thumb. Then again, I grew up with monochrome terminals
vs. unusably slow syntax highlighting, and grayscale printers (and we
had to live in a small shoebox in the middle of the road).
YMMV. Obviously.
Dan
More information about the Python-list
mailing list