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

<- View Parent
iAvicenna@lemmy.world ⁨3⁩ ⁨days⁩ ago

It is not “assume” as in a conscious “this is probably a bool I will assume so” but more like a slip of attention by someone who is more used to the bool context of not. Is “not integer” or “not list” really that commonly used that it is even comparable to its usage in bool context?

source
Sort:hotnewtop