removed 1st edition code

This commit is contained in:
Luciano Ramalho
2020-03-11 18:03:55 -03:00
parent 1be97eea3e
commit 506d343843
460 changed files with 0 additions and 108428 deletions

View File

@@ -1,24 +0,0 @@
""" Example adapted from ``yield_delegate_fail.py``
The following program performs a simple abstraction over the process of
yielding.
"""
# tag::YIELD_DELEGATE_FIX[]
def f():
def do_yield(n):
yield n
x = 0
while True:
x += 1
yield from do_yield(x)
# end::YIELD_DELEGATE_FIX[]
if __name__ == '__main__':
print('Invoking f() now produces a generator')
g = f()
print(next(g))
print(next(g))
print(next(g))