None assigment

Peter Hansen peter at engcorp.com
Sat Feb 10 12:46:56 EST 2001


Gregoire Welraeds wrote:
> 
> Maybe None have been added to builtin to avoid special cases. But it
> becomes clear, as we understand it, that None is now a special case of
> builtin.
> 
> So, following that thought, we think that None should be a reserved word.
> 
[snip]
> 
> And we all agree that programmers should not touch to the value of
> __builtin__.None. We think that the ability to override None because None
> is a builtin is a conceptual problem.

No!  Please, why muck with things that work perfectly well?

I can think of at least one situation in which the ability
to do this could be of some _real_ value.  Making None
a reserved word would prevent me from doing that.  It would
gain you nothing except a stricter language which would
be getting ever closer to those "other" languages which
are so restrictive that they place limits on your imagination
and ability to innovate.

Why, I wonder, do some people think that just because
something "shouldn't" happen, it must therefore 
never be allowed to happen?  If "we all agree that 
programmers should not touch None", can't we just
stop there and leave those mature people to do what
they wish?  (People "shouldn't speed", either, but
I don't think many want governors on their car engine 
actually to _prevent_ it.)

Remember, Python is a dynamic language.  The more
special-case restictions you place on it, the less
like Python it's going to look.

likely-starting-a-flame-war-ly yr's  -Peter

P.S. Identifying useful things that could be done with
assigning to None is left as an exercise to the reader.
I wouldn't want to stifle creativity by mentioning my
idea too quickly. :-)



More information about the Python-list mailing list