mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Add more complete reference. Change a co.back() call to co.tran() --
that's all that's needed.
This commit is contained in:
parent
5ddd1a8dcb
commit
27f9b84684
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
# Coroutine example: general coroutine transfers
|
||||
#
|
||||
# The program is a variation of a Simula 67 program due to Dahl & Hoare,
|
||||
# (Dahl/Dijkstra/Hoare, Structured Programming; Academic Press, 1972)
|
||||
# who in turn credit the original example to Conway.
|
||||
#
|
||||
# We have a number of input lines, terminated by a 0 byte. The problem
|
||||
|
@ -43,7 +44,7 @@ from Coroutine import *
|
|||
|
||||
def getline(text):
|
||||
for line in string.splitfields(text, '\n'):
|
||||
co.back(line)
|
||||
co.tran(codisassembler, line)
|
||||
|
||||
def disassembler():
|
||||
while 1:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue