Clarify once more that "if []" will remain valid Python forever.

This commit is contained in:
Guido van Rossum 2002-04-03 00:58:01 +00:00
parent 74271e0dcd
commit b0cf9e95d0
1 changed files with 12 additions and 0 deletions

View File

@ -115,6 +115,18 @@ Review
container is interpreted as a truth value, an empty container
is considered false and a non-empty one is considered true."
8) Should we strive to require that Boolean operations (like "if",
"and", "not") have a bool as an argument in the future, so that
for example "if []:" would become illegal and would have to be
writen as "if bool([]):" ???
=> No!!! Some people believe that this is how a language with a
Boolean type should behave. Because it was brought up, others
have worried that I might agree with this position. Let me
make my position on this quite clear. This is not part of the
PEP's motivation and I don't intend to make this change. (See
also the section "Clarification" below.)
Rationale