[Python-ideas] Python docs: page: In what ways in None special
Chris Barker
chris.barker at noaa.gov
Tue Aug 14 19:09:58 EDT 2018
On Tue, Aug 14, 2018 at 10:45 AM, Rhodri James <rhodri at kynesim.co.uk> wrote:
> On 'None is a constant':
>
> Erm. I think you've got carried away with simplifying this and gone down
> a blind alley. None is a literal, and like any other literal can't be
> rebound.
no, it's not -- None is keyword, and just like any other keyword, it can't
be re-bound. However, every other keyword I tried to rebind results in a
generic:
SyntaxError: invalid syntax
(except None, True, and False)
which I suppose is because while None is a keyword, it can be used pretty
much anywhere any other name can be used (as opposed to say, def)
Either this entire section is irrelevant or you meant to explain that there
> is only one "NoneType" object.
>
> Constant is a bit of a loaded term in Python, and I think you've fallen
> foul of it here.
>
yes, I think "singleton" is the word you want here, though it is a bi CS-y
:-(
-CHB
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180814/12a8dad4/attachment.html>
More information about the Python-ideas
mailing list