@whitequark This should have the same memory properties as the original:
for index, waker in enumerate(waker for waker in wakers if waker(*args)): wakers[index] = waker del wakers[index + 1:]Not sure if it's more readable or if I'm just liner golfing. I'm also not thrilled with using index outside the loop, I actually wish that wouldn't be in scope.