4 ms·
For what it's worth, I am generally in agreement with you, so you're not alone. I do think it would've been better to have 0, specifically, not be falsy - unli
by ledauphin 7y ago
For what it's worth, I am generally in agreement with you, so you're not alone.
I do think it would've been better to have 0, specifically, not be falsy - unlike the other cases, 0 is not 'the absence of any actual data' but rather a special case of the data. I assume Python stuck with tradition on this one mostly because it is so tightly tied to C and UNIX-style scripting that changing it would've been confusing for most early users.