A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-June/080217.html below:

[Python-Dev] Assignment to None

[Python-Dev] Assignment to NoneNick Coghlan ncoghlan at gmail.com
Wed Jun 11 11:21:12 CEST 2008
Thomas Lee wrote:
> Martin v. Löwis wrote:
>> In Python 3, None, True, and False are keywords, so clearly, the
>> intended semantics is also the implemented one (and the language
>> description for 2.x needs to be updated/clarified).
>>
>>   
> Interestingly enough, the semantics of True, False and None are 
> different from one another in 2.6:
> 
> True = "blah" and False = 6 are perfectly legal in Python <=2.6.

True and False didn't get the same treatment as None because we didn't 
want to break the follow compatibility workaround for Python version 
prior to 2.2.2:

try:
   True
except NameError:
   True, False = 1, 0

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4