Remove `__next__`.
This commit is contained in:
parent
c9082be37d
commit
6fe11aa205
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ def _names():
|
|||
|
||||
class InfiniteStack(tuple):
|
||||
|
||||
names = _names().__next__
|
||||
names = lambda n=_names(): next(n)
|
||||
|
||||
def __iter__(self):
|
||||
if not self:
|
||||
|
|
|
|||
Loading…
Reference in New Issue