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".
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/EFSVOKC4RQ3UIYV6ESADHNDZZDWHIVN5/
Code of Conduct: http://python.org/psf/codeofconduct/