jroid8@lemmy.world to Programmer Humor@lemmy.ml · 11 months agoknow the features of your languagelemmy.worldimagemessage-square142fedilinkarrow-up1642arrow-down124
arrow-up1618arrow-down1imageknow the features of your languagelemmy.worldjroid8@lemmy.world to Programmer Humor@lemmy.ml · 11 months agomessage-square142fedilink
minus-squarejuggling_collie@lemmy.mllinkfedilinkarrow-up13·11 months agoYou need to be careful here though. You might not intend for 0 and None to mean the same thing.
minus-squareBumblefumble@lemm.eelinkfedilinkarrow-up3·edit-211 months agoSo this won’t do the intended thing if a is 0. Edit: Sorry I meant to reply to the parent comment, realising now you already write the exact same thing.
minus-squareunalivejoy@lemm.eelinkfedilinkEnglisharrow-up3·11 months agoAlso if a is an empty collection or str, or false.
You need to be careful here though. You might not intend for
0
andNone
to mean the same thing.So this won’t do the intended thing if a is 0.
Edit: Sorry I meant to reply to the parent comment, realising now you already write the exact same thing.
Also if a is an empty collection or str, or false.