you are viewing a single comment's thread
view the rest of the comments
[–] -1 points 1 year ago (1 child)

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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 1 year ago

    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...

  • source
  • parent