[Python-Dev] static int debug = 0;
Fred L. Drake, Jr.
Thu, 31 Aug 2000 23:28:59 -0400 (EDT)
Jeremy Hylton writes:
> The change is redundant, as several people pointed out, because the C
> std requires debug to be initialized to 0. I didn't realize this.
> Inadvertently, however, I made the right change. The preferred style
> is to be explicit about initialization if other code depends on or
> assumes that it is initialized to a particular value -- even if that
> value is 0.
According to the BDFL? He's told me *not* to do that if setting it
to 0 (or NULL, in case of a pointer), but I guess that was several
years ago now (before I went to CNRI, I think).
I need to get a style guide written, I suppose! -sigh-
(I agree the right thing is to use explicit initialization, and
would go so far as to say to *always* use it for readability and
robustness in the face of changing code.)
Fred L. Drake, Jr. <fdrake at beopen.com>
BeOpen PythonLabs Team Member