abhi9u@lemmy.world to Technology@lemmy.worldEnglish · 11 days agoPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.comexternal-linkmessage-square148linkfedilinkarrow-up1169arrow-down116
arrow-up1153arrow-down1external-linkPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.comabhi9u@lemmy.world to Technology@lemmy.worldEnglish · 11 days agomessage-square148linkfedilink
minus-squarecatloaf@lemm.eelinkfedilinkEnglisharrow-up2·11 days agoYou can make that assumption at your own peril.
minus-squareiAvicenna@lemmy.worldlinkfedilinkEnglisharrow-up1·11 days agoIf anything len tells you that it is a sequence or a collection, “not” does not tell you that. That I feel like is the main point of my objection.
You can make that assumption at your own peril.
If anything len tells you that it is a sequence or a collection, “not” does not tell you that. That I feel like is the main point of my objection.