"Martin v. Loewis" wrote: > >... > > > The current subtyping strategy provides a better hook for deprecation > > warnings. My only concern is that we decide and document that booleans > > will one day be as completely unrelated to integers as exceptions are to > > strings. > > I'm not sure that this is desirable. By the same rationale, you should > argue that boolean operations on integers are a bad thing. This would > be not Pythonic. Let's take this logic a little further. If you're arguing that booleans should be subtypes of integers because integers can be used in a boolean context then I guess booleans should ALSO be subtypes of strings and lists because strings and lists can also be used in a boolean fashion. Using an integer as a boolean is common. I do it almost every day I program in languages with both types. Using a boolean as an integer is not common in my programming (though Tim's may be different). Where it crops up in my programming it is probably an error where I passed the parameters to the function in the wrong order. Paul Prescod
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