Setting the value of True

Terry Reedy tjreedy at udel.edu
Fri Aug 23 19:56:28 EDT 2013


On 8/23/2013 7:38 PM, jeangawron at gmail.com wrote:
> Python allows you set the value of True

Unqualified 'Python', used in the present tense, refers to the latest 
release or repository version.

 >>> True = 1.3
SyntaxError: assignment to keyword

>>>> True = 1.3
>
> Now this is consistent with the decision to let you set the
> value of various builtin names.  But why is this case different:
>
>>>> None = 1.3
>    File "<stdin>", line 1
> SyntaxError: cannot assign to None


-- 
Terry Jan Reedy




More information about the Python-list mailing list