Dec. 22, 2020
9:06 a.m.
22.12.20 03:18, David Mertz пише:
Indeed. The discussion around this was quite specifically that many people defined:
True = 1 False = 0
At the top of their code, and used that. This was the main reason they were built-ins rather than keywords, so as not to break that large body of existing code.
I think that it was rather to allow writing the code try: True, False except NameError: True = 1 False = 0 which would work with new and old Python versions. People that defined they own constants before adding bool would likely used "true" or "TRUE".