osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tutor] beginning to code


On Mon, 18 Sep 2017 11:00 pm, Rustom Mody wrote:

>> {None, 0, "" {}, []} ? False
>> Everything_else ? True
>> 
>> This mapping is neither obvious nor trivial
> 
> Sufficiently non-obvious that I missed the key element:
> {None, 0, "" {}, [], False} ? False

I thought it was intentional, because there's nothing more obvious than that
False is false. Unless you're a pedant and completist like me, why even bother
mentioning that False is falsey?

Especially since you left out so many more obvious values.



-- 
Steve
?Cheer up,? they said, ?things could be worse.? So I cheered up, and sure
enough, things got worse.