abhi9u@lemmy.world to Technology@lemmy.worldEnglish · 2 months agoPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.comexternal-linkmessage-square118linkfedilinkarrow-up1196arrow-down121cross-posted to: python@programming.dev
arrow-up1175arrow-down1external-linkPython Performance: Why 'if not list' is 2x Faster Than Using len()blog.codingconfessions.comabhi9u@lemmy.world to Technology@lemmy.worldEnglish · 2 months agomessage-square118linkfedilinkcross-posted to: python@programming.dev
minus-squarecatloaf@lemm.eelinkfedilinkEnglisharrow-up3·2 months agoYou can make that assumption at your own peril.
minus-squareiAvicenna@lemmy.worldlinkfedilinkEnglisharrow-up3·2 months 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.
minus-squareWhyJiffie@sh.itjust.workslinkfedilinkEnglisharrow-up3·2 months agoI don’t think they are a minority
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.
I don’t think they are a minority