Exemplo n.º 1
0
 def newg(*args, **kwargs):
     assert not isgeneratorfunction(g), 'Only use for non-generators.'
     raise StopIteration(g(*args, **kwargs))
     yield