]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add more complete reference. Change a co.back() call to co.tran() --
authorGuido van Rossum <guido@python.org>
Thu, 22 Mar 2001 13:36:11 +0000 (13:36 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 22 Mar 2001 13:36:11 +0000 (13:36 +0000)
that's all that's needed.

Demo/threads/squasher.py

index 3d5ea0086cbf7dccc139fde218e994b0967d09f8..0d59cb839bb5f59d39cdc512a78711d503e25725 100644 (file)
@@ -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: