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
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