I remember that using generators with any / all can produce weird bugs. Better use a list comprehension here.