Why is 'None' not assignable but 'True'/'False' are?



In Python 2.4.1:

>>> None = 99
SyntaxError: assignment to None
>>> True = 99
>>> False = 99
>>> True == False
True
-----------------------
So why is 'None' special?

.



Relevant Pages

  • Long integer arrays in Python; how? /Carl
    ... dim = 1 ... The problem is the last assignment, which is not valid, since the integer is ... Is there a way around this problem in Python? ... Prev by Date: ...
    (comp.lang.python)
  • Re: SyntaxError: invalid syntax
    ... > Please post the *full* traceback of the error, ... > Just "SyntaxError" on its own is not enough to tell what is going on, ... or that he's using a program written for a newer version of Python than ... Prev by Date: ...
    (comp.lang.python)
  • Re: why cannot assign to function call
    ... as in Python, Java, REALbasic, .NET, etc. ... Pointers are passed and assigned by value, ... If you simply use the name, you get by-value semantics. ... Python's assignment semantics, and further appear ...
    (comp.lang.python)
  • Re: By value or by reference?
    ... >> just like Python never does. ... ...which in turn depends, also, on what assignment statements mean *in ... once you call foo, in each language, it's just as if there had been ... registers and addressability only of memory, not of registers, and ...
    (comp.lang.python)
  • Re: Is python very slow compared to C
    ... Yes, but quite similar to assignment in Java, which is apparently the ... most widely taught language nowadays. ... copy) and SET (assignment by reference, like Java and Python). ... If Cobol's key underlying concepts had proved satisfactory to the needs ...
    (comp.lang.python)