I didn't want to jump on the bandwagon, but... It occurs to me that one potential benefit of having a boolean type is to avoid mistakes like this: test = value & MASK if test == True: DoSomething() Sure, "if bool(test) == True:" does the right thing, but so does "if test:". You wouldn't have made the mistake in the first place if you'd thought of that. :-) I think at least add something like this should be added to the description in the PEP: def __cmp__(self,other): return int.__cmp__(self,bool(other)) -Jerry -O Gerald S. Williams, 22Y-103GA : mailto:gsw@agere.com O- -O AGERE SYSTEMS, 555 UNION BLVD : office:610-712-8661 O- -O ALLENTOWN, PA, USA 18109-3286 : mobile:908-672-7592 O-
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