updade from Atlas repo

This commit is contained in:
Luciano Ramalho
2021-05-21 18:56:12 -03:00
parent c518bf851e
commit 8a330d822b
120 changed files with 2190 additions and 1184 deletions

View File

@@ -17,14 +17,14 @@ class Sentence:
self.text = text
def __repr__(self):
return 'Sentence(%s)' % reprlib.repr(self.text)
return f'Sentence({reprlib.repr(self.text)})'
def __iter__(self):
word_iter = RE_WORD.finditer(self.text) # <1>
return SentenceIter(word_iter) # <2>
class SentenceIter():
class SentenceIter:
def __init__(self, word_iter):
self.word_iter = word_iter # <3>