Remove `__next__`.

This commit is contained in:
Simon Forman 2020-04-24 10:32:48 -07:00
parent c9082be37d
commit 6fe11aa205
3 changed files with 5 additions and 5 deletions

View File

@ -75,8 +75,8 @@ from .utils.types import (
)
_SYM_NUMS = lambda: next(count())
_COMB_NUMS = lambda: next(count())
_SYM_NUMS = lambda c=count(): next(c)
_COMB_NUMS = lambda c=count(): next(c)
_R = list(range(10))

View File

@ -36,8 +36,8 @@ class InfiniteStack(tuple):
_NAMES = _names()
next(_NAMES)
names = _NAMES.__next__
reset = lambda _, _n=_NAMES: _n.send(-1)
names = lambda: next(_NAMES)
reset = lambda _self, _n=_NAMES: _n.send(-1)
def __init__(self, code):
self.reset()

View File

@ -11,7 +11,7 @@ def _names():
class InfiniteStack(tuple):
names = _names().__next__
names = lambda n=_names(): next(n)
def __iter__(self):
if not self: