def _run_wakers(wakers: list, *va_args): # Python doesn't have `.retain()` :( index = 0 for waker in wakers: if waker(*va_args): wakers[index] = waker index += 1 del wakers[index:]
https://files.mastodon.social/media_attachments/files/112/387/371/253/390/671/original/aa7492e72edec17f.png