None, False, True
afriere at yahoo.co.uk
Wed Sep 17 03:56:56 CEST 2003
"Pettersen, Bjorn S" <BjornPettersen at fairisaac.com> wrote in message news:<mailman.1063738162.25853.python-list at python.org>...
> > From: M-a-S [mailto:NO-MAIL at hotmail.com]
> > >>> None = 3
> you're assigning the value 3 to the name 'None'
> > <stdin>:1: SyntaxWarning: assignment to None
> the compiler warns you that 'None' is a special name that you probably
> don't want to rebind.
Actually the compiler warns you that 'None' is s special name that you
probably _didn't_ want to rebind. But you have. As you can see, the
compiler doesn't issue such warnings with regard to 'True' and
'False.' Does that explain it?
>>>def spam(): pass
>>>None = spam()
<stdin>:1: SyntaxWarning: assignment to None
>>>False = bool(spam())
>>>True = bool(spam)
>>>(None, False, True)
(None, False, True)
all fixed now %)
More information about the Python-list