Merge pull request #6645 from jdufresne/2to3

Remove obsolete comment and workaround for 2to3
This commit is contained in:
Takeshi KOMIYA 2019-08-18 01:16:03 +09:00 committed by GitHub
commit 04a3b89200
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,9 +60,7 @@ class peek_iter:
return self
def __next__(self, n: int = None) -> Any:
# note: prevent 2to3 to transform self.next() in next(self) which
# causes an infinite loop !
return getattr(self, 'next')(n)
return self.next(n)
def _fillcache(self, n: int) -> None:
"""Cache `n` items. If `n` is 0 or None, then 1 item is cached."""