Here's what's happening on my NodeMCU board with ESP8266:
>>> x = iter((28,75,127,179))
>>> x.next()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'iterator' object has no attribute 'next'
Same occurs with a custom defined generator:
>>> def foo():
... for i in (28,75,127,179):
... yield i
...
...
...
>>> foo
<generator>
>>> f = foo()
>>> f.next()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'generator' object has no attribute 'next'
Seemingly this would work, since objects are indeed recognized as generators/iterators. Question is then, how do I go about making this work ?