@jroid8@lemmy.world to Programmer Humor@lemmy.ml • 1 year agoknow the features of your languagelemmy.worldimagemessage-square145fedilinkarrow-up1646arrow-down124
arrow-up1622arrow-down1imageknow the features of your languagelemmy.world@jroid8@lemmy.world to Programmer Humor@lemmy.ml • 1 year agomessage-square145fedilink
minus-square@juggling_collie@lemmy.mllinkfedilink13•1 year agoYou need to be careful here though. You might not intend for 0 and None to mean the same thing.
minus-square@Bumblefumble@lemm.eelinkfedilink3•edit-21 year 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-squareunalivejoylinkfedilinkEnglish3•1 year 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.