Using coroutines in Python for combinatorial generation.