not_IO@lemmy.blahaj.zone to Microblog Memes@lemmy.worldEnglish · 1 month agooddly specificlemmy.blahaj.zoneimagemessage-square196linkfedilinkarrow-up11.41K
arrow-up11.41Kimageoddly specificlemmy.blahaj.zonenot_IO@lemmy.blahaj.zone to Microblog Memes@lemmy.worldEnglish · 1 month agomessage-square196linkfedilink
minus-squareZagorath@aussie.zonelinkfedilinkEnglisharrow-up1·1 month 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-up4·1 month 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…