Skip to content

Commit 932bfe5

Browse files
committed
Remove 2to3 workaround
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent 5d59275 commit 932bfe5

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

bpython/repl.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,13 @@ def current(self):
208208
raise ValueError('No current match.')
209209
return self.matches[self.index]
210210

211-
def _next_impl(self):
212-
"""Keep this around until we drop 2to3."""
213-
self.index = (self.index + 1) % len(self.matches)
214-
return self.matches[self.index]
215-
216211
def next(self):
217-
return self._next_impl()
212+
return self.__next__()
218213

219214
def __next__(self):
220-
return self._next_impl()
215+
"""Keep this around until we drop 2to3."""
216+
self.index = (self.index + 1) % len(self.matches)
217+
return self.matches[self.index]
221218

222219
def previous(self):
223220
if self.index <= 0:

0 commit comments

Comments
 (0)