None

Werner Schiendl ws-news at gmx.at
Mon Oct 29 04:29:58 EST 2001


Hi,

"Greg Ewing" <greg at cosc.canterbury.ac.nz> wrote in message
news:3BD8C747.3DA9EEEC at cosc.canterbury.ac.nz...
...
>
> Actually, NULL is a preprocessor macro in C, so it's
> like doing
>
> #undef NULL
> #define NULL 42
>
> which would really confuse someone reading your C program!
>
...
even better would be to define it
#define NULL ((void *) 42)

but this is unlikely to happen by accident.

Assigning to None, however, seems more likely to happen e. g. if someone
tries to drop some unwanted return values there:

a, None, b = function1()

instead of

a, dummy, b = function1()

regards
Werner


> --
> Greg Ewing, Computer Science Dept, University of Canterbury,
> Christchurch, New Zealand
> To get my email address, please visit my web page:
> http://www.cosc.canterbury.ac.nz/~greg





More information about the Python-list mailing list