Commit 34ec8b63 authored by Guido van Rossum's avatar Guido van Rossum

Add more complete reference. Change a co.back() call to co.tran() --

that's all that's needed.
parent e3eaef30
# Coroutine example: general coroutine transfers # Coroutine example: general coroutine transfers
# #
# The program is a variation of a Simula 67 program due to Dahl & Hoare, # 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. # who in turn credit the original example to Conway.
# #
# We have a number of input lines, terminated by a 0 byte. The problem # We have a number of input lines, terminated by a 0 byte. The problem
...@@ -43,7 +44,7 @@ from Coroutine import * ...@@ -43,7 +44,7 @@ from Coroutine import *
def getline(text): def getline(text):
for line in string.splitfields(text, '\n'): for line in string.splitfields(text, '\n'):
co.back(line) co.tran(codisassembler, line)
def disassembler(): def disassembler():
while 1: while 1:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment