You could just leave this `if` expression out, because `set_len(self, 0)` will be a no-op if it's already zero.