Message344166
Sorry for the late reply.
> Just a question: why we need to check ``if number == 0:``? In the
> proposal you asked for None too. What changed? Even if the function is
> called with False, will it hurts to keep the default value?
Fair question. On rethinking, I'm okay with an explicit check for None
or zero, ``if number is None or number < 0`` but I don't like the idea
of accepting *any* falsey value.
Calling the function with False is fine, since False == 0 but I don't
think it is fine to call the function with (say) [] or {} or "", which
are all falsey values. |
|
Date |
User |
Action |
Args |
2019-06-01 10:45:51 | steven.daprano | set | recipients:
+ steven.daprano, acucci, cheryl.sabella, mangrisano |
2019-06-01 10:45:51 | steven.daprano | link | issue36461 messages |
2019-06-01 10:45:51 | steven.daprano | create | |
|