Skip to content

Commit

Permalink
PEP-3333: LatinIter.__next__ should call self._next before testing se…
Browse files Browse the repository at this point in the history
…lf.transform_ok (#2128)
  • Loading branch information
marc-swingler authored Nov 1, 2021
1 parent 0cd7acd commit 1acde90
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pep-3333.txt
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,11 @@ a block boundary.)
return self

def __next__(self):
data = self._next()
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:
return self._next()
return data

class Latinator:

Expand Down

0 comments on commit 1acde90

Please sign in to comment.