PEP-3333: LatinIter.__next__ should call self._next before testing self.transform_ok (#2128)
This commit is contained in:
parent
0cd7acd5a3
commit
1acde901b8
|
@ -424,10 +424,11 @@ a block boundary.)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __next__(self):
|
def __next__(self):
|
||||||
|
data = self._next()
|
||||||
if self.transform_ok:
|
if self.transform_ok:
|
||||||
return piglatin(self._next()) # call must be byte-safe on Py3
|
return piglatin(data) # call must be byte-safe on Py3
|
||||||
else:
|
else:
|
||||||
return self._next()
|
return data
|
||||||
|
|
||||||
class Latinator:
|
class Latinator:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue