> Having canonical True and False values would lead newcomers > to compare to them. This would work, for example: > > DONE = y and (x > y) > ... > if DONE is False: > ... > > On the other hand, this wouldn't (unless y is a boolean): > > DONE = (x > y) and y > ... > if DONE is False: > ... > > Of course, it works either way if you replace "DONE is False" > with "not DONE". Tutorial should point this out. It's poor coding style even in languages that do have strict Booleans, so I think it's a good idea to nip this one in the bud. > Or if you replace "y" with "bool(y)". What a waste to write "if bool(y) == True" instead of "if y" ... :-( --Guido van Rossum (home page: http://www.python.org/~guido/)
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