Skip to content

Commit ad7b40b

Browse files
committed
chore: drop Python2-specific aliases
1 parent 4165633 commit ad7b40b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

google/api_core/page_iterator.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def __iter__(self):
125125
"""The :class:`Page` is an iterator of items."""
126126
return self
127127

128-
def next(self):
128+
def __next__(self):
129129
"""Get the next value in the page."""
130130
item = next(self._item_iter)
131131
result = self._item_to_value(self._parent, item)
@@ -134,9 +134,6 @@ def next(self):
134134
self._remaining -= 1
135135
return result
136136

137-
# Alias needed for Python 2/3 support.
138-
__next__ = next
139-
140137

141138
def _item_to_value_identity(iterator, item):
142139
"""An item to value transformer that returns the item un-changed."""
@@ -232,9 +229,6 @@ def __next__(self):
232229
self.__active_iterator = iter(self)
233230
return next(self.__active_iterator)
234231

235-
# Preserve Python 2 compatibility.
236-
next = __next__
237-
238232
def _page_iter(self, increment):
239233
"""Generator of pages of API responses.
240234

0 commit comments

Comments
 (0)