On Thu, Aug 24, 2017 at 5:47 PM, Paul Rubin <no.email@nospam.invalid> wrote: > Ben Finney <ben+pyt...@benfinney.id.au> writes: >> generate_id = functools.partial(next, itertools.count()) > > Is something wrong with: > > >>> g = itertools.count().next > >>> g() > 0 > >>> g() > 1 > >>> g() > 2 > >>> ...
That's the Python 2 version of the same thing. The next method was renamed to __next__ to synchronize it with other, similar methods. ChrisA -- https://mail.python.org/mailman/listinfo/python-list