Add clients from 'other' _ClientList to self. 'offset_to_current' works as described for add()
(self, other: _ClientList, offset_to_current: int = 0)
| 391 | self.current_index += 1 |
| 392 | |
| 393 | def join(self, other: _ClientList, offset_to_current: int = 0) -> None: |
| 394 | """ |
| 395 | Add clients from 'other' _ClientList to self. |
| 396 | 'offset_to_current' works as described for add() |
| 397 | """ |
| 398 | pos = max(0, self.current_index + offset_to_current) |
| 399 | if pos < len(self.clients): |
| 400 | self.clients = self.clients[:pos:] + other.clients + self.clients[pos::] |
| 401 | else: |
| 402 | self.clients.extend(other.clients) |
| 403 | |
| 404 | def index(self, client: Window) -> int: |
| 405 | return self.clients.index(client) |
no outgoing calls