@jroid8 to Programmer [email protected] • 10 months agoknow the features of your languageimagemessage-square145arrow-up1646arrow-down123
arrow-up1623arrow-down1imageknow the features of your language@jroid8 to Programmer [email protected] • 10 months agomessage-square145
minus-square@[email protected]linkfedilink13•10 months agoYou need to be careful here though. You might not intend for 0 and None to mean the same thing.
minus-square@[email protected]linkfedilink3•edit-210 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-squareunalivejoylinkfedilinkEnglish3•10 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.