Comment on Python Performance: Why 'if not list' is 2x Faster Than Using len()

<- View Parent
jerkface@lemmy.ca ⁨6⁩ ⁨days⁩ ago

Truthiness is so fundamental, all values have a truthiness, whether they are bool or not. Even in C, int x = value(); if (!x) x_is_not_zero(); is valid and idiomatic.

source
Sort:hotnewtop