Proposed new syntax

Paul Rubin no.email at nospam.invalid
Thu Aug 24 23:19:30 EDT 2017


Steve D'Aprano <steve+python at pearwood.info> writes:
> the public API is to call the next() built-in function, and the
> implementation is the __next__ dunder.

In that case it would have been nice to make next() cache the most
recently generated value from the iterator.  That would make lots of
code simpler.



More information about the Python-list mailing list