2 ms·
I like Python's approach. Anything null, zero, or "empty" is false (+ False of course), but it won't do any type conversion, so you don't get cases like "0" bei
by kbd 16y ago
I like Python's approach. Anything null, zero, or "empty" is false (+ False of course), but it won't do any type conversion, so you don't get cases like "0" being true.
Edit: though I wish the standard library used its configurable truthiness a little more. I'd like a closed filehandle to evaluate to False, for instance.
- kbd 16y ago> so you don't get cases like "0" being true I meant to say false :(