[Python-Dev] Tricky way of of creating a generator via a comprehension expression (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Nov 23 03:17:39 EST 2017


Ivan Levkivskyi wrote:

"People sometimes want to refactor for-loops containing yield into a comprehension

By the way, do we have any real-life examples of people wanting to do this? It might help us decide what the semantics should be.

-- Greg



More information about the Python-Dev mailing list