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

<- View Parent
jj4211@lemmy.world ⁨4⁩ ⁨weeks⁩ ago

In context, one can consider it a bool.

Besides, I see c code all the time that treats pointers as bool for the purposes of an if statement. !pointer is very common and no one thinks that means pointer it’s exclusively a Boolean concept.

source
Sort:hotnewtop