From 1acde901b889349a41a6b0502ad775dac0280594 Mon Sep 17 00:00:00 2001 From: Marc Swingler Date: Mon, 1 Nov 2021 15:47:24 -0700 Subject: [PATCH] PEP-3333: LatinIter.__next__ should call self._next before testing self.transform_ok (#2128) --- pep-3333.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pep-3333.txt b/pep-3333.txt index 7c67375d33d..b7b96bbceba 100644 --- a/pep-3333.txt +++ b/pep-3333.txt @@ -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: