Fix to schedule() pseudo-code by Yuval Greenfield.

This commit is contained in:
Guido van Rossum 2013-03-20 08:21:20 -07:00
parent 0ccf2a54eb
commit a00d4d1343
1 changed files with 2 additions and 1 deletions

View File

@ -486,8 +486,9 @@ Examples
def stop(self):
self.running = False
def schedule(self, coroutine, stack=(), value=None, *exc):
def schedule(self, coroutine, stack=(), val=None, *exc):
def resume():
value = val
try:
if exc:
value = coroutine.throw(value,*exc)