Skip to content

Commit

Permalink
update generator sample
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelliao committed May 16, 2015
1 parent 582141f commit d445480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/advance/do_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def fib(max):
g = fib(5)
while 1:
try:
x = g.send(None)
x = next(g)
print('g:', x)
except StopIteration as e:
print('Generator return value:', e.value)
Expand Down

0 comments on commit d445480

Please sign in to comment.