Author steven.daprano
Recipients acucci, cheryl.sabella, mangrisano, steven.daprano
Date 2019-06-01.10:45:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20190601104543.GR4221@ando.pearwood.info>
In-reply-to <1558762853.33.0.966475323893.issue36461@roundup.psfhosted.org>
Content
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.
History
Date User Action Args
2019-06-01 10:45:51steven.dapranosetrecipients: + steven.daprano, acucci, cheryl.sabella, mangrisano
2019-06-01 10:45:51steven.dapranolinkissue36461 messages
2019-06-01 10:45:51steven.dapranocreate