IO, the Angel@lemmy.blahaj.zone to Microblog Memes@lemmy.worldEnglish · 2 months agooddly specificimagemessage-square198linkfedilinkarrow-up11.5Karrow-down112
arrow-up11.49Karrow-down1imageoddly specificIO, the Angel@lemmy.blahaj.zone to Microblog Memes@lemmy.worldEnglish · 2 months agomessage-square198linkfedilink
minus-squareZagorath@aussie.zonelinkfedilinkEnglisharrow-up1arrow-down2·2 months agoI’m imagining something like this: def add_member(group, user): if (len(group.members) <= GROUP_CHAT_LIMIT): ... If GROUP_CHAT_LIMIT is 8 bits, this does not work.
minus-squarePasserby6497@lemmy.worldlinkfedilinkEnglisharrow-up4arrow-down1·2 months agoSo add a +1 like you would for any index to count comparison? I guess I’m failing to see how this doesn’t work as long as you properly handle the comparison logic. Maybe you can explain how this doesn’t work…
I’m imagining something like this:
def add_member(group, user): if (len(group.members) <= GROUP_CHAT_LIMIT): ...
If
GROUP_CHAT_LIMIT
is 8 bits, this does not work.So add a +1 like you would for any index to count comparison?
I guess I’m failing to see how this doesn’t work as long as you properly handle the comparison logic. Maybe you can explain how this doesn’t work…