25 Nov
2017
25 Nov
'17
8:18 a.m.
24.11.17 00:20, Greg Ewing пише:
Serhiy Storchaka wrote:
Ivan explained that this function should be rough equivalent to
def f(): t = [(yield i) for i in range(3)] return (x for x in t)
This seems useless to me. It turns a lazy iterator into an eager one, which is a gross violation of the author's intent in using a generator expression.
This is a *rough* equivalent. There are differences in details.