Mercurial > pygame-tutorial-slides
changeset 123:c167a50ba869
created
| author | Radomir Dopieralski |
|---|---|
| date | Mon, 18 Jun 2012 18:39:44 +0200 |
| parents | 84cf505b6792 |
| children | 28eaea93e4d6 |
| files | docs/Iterator%20generators |
| diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/Iterator%20generators Mon Jun 18 18:39:44 2012 +0200 @@ -0,0 +1,18 @@ +{{{#!pycon +>>> def itergen(): +... yield 1 +... yield 2 +... yield 3 +... +>>> ig = itergen() +>>> ig.next() +1 +>>> ig.next() +2 +>>> ig.next() +3 +>>> ig.next() +Traceback (most recent call last): + File "<stdin>", line 1, in <module> +StopIteration +}}} \ No newline at end of file
