Re:Deno Is Webby
by PufPufPuf on Wednesday March 16, 2022 @06:14PM
(#30704805)
I always found it strange that in Python, stuff doesn't get implicitly cast to string (even Java does that!), but for whatever reason the idiomatic way to check if a collection is empty is to do "if collection:", implicitly casting to bool.
[ Parent
| on HN ]
Re:Deno Is Webby
by heavyset_go on Wednesday March 16, 2022 @10:27PM
(#30706932)
Nothing gets casted to a bool in Python if statements.