ch17: update from book draft

This commit is contained in:
Luciano Ramalho
2020-02-18 23:45:05 -03:00
parent 70650841b3
commit aa868e8f75
35 changed files with 788 additions and 31 deletions

View File

@@ -5,7 +5,7 @@ WARNING: the Iterator Pattern is much simpler in idiomatic Python;
see: sentence_gen*.py.
"""
# BEGIN SENTENCE_ITER
# tag::SENTENCE_ITER[]
import re
import reprlib
@@ -41,7 +41,7 @@ class SentenceIterator:
def __iter__(self): # <9>
return self
# END SENTENCE_ITER
# end::SENTENCE_ITER[]
def main():
import sys