在生成器send方法这里有一个地方理解错了,做个更正:
def gen():
while True:
s=yield
print(s)
g=gen()
g.send('kissg')
Traceback (most recent call last):
File "F:/python/pizza1.py", line 10, in <module>
g.send('kissg')
TypeError: can't send non-None value to a just-started generator