Overriding True and False ?

INADA Naoki songofacandy at gmail.com
Mon Jan 30 02:38:31 EST 2017


It's fixed already in Python 3.
Please use Python 3 when teaching to students.

$ python3
Python 3.6.0 (default, Dec 24 2016, 00:01:50)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> True = "foo"
  File "<stdin>", line 1
SyntaxError: can't assign to keyword



More information about the Python-list mailing list