Chris Angelico <ros...@gmail.com> writes: > On Thu, Aug 24, 2017 at 8:40 PM, Ben Finney <ben+pyt...@benfinney.id.au> > wrote: > > Paul Rubin <no.email@nospam.invalid> writes: > >> Is something wrong with: > >> > >> >>> g = itertools.count().next > > It's on all iterators; it's the Py2 equivalent for __next__.
Yeah, when people are talking today about “Python”, unqualified by version, I think it's a fair assumption that responses can be only regarding Python 3 unless there's good reason otherwise :-) So, yes there's something wrong with ‘itertools.count().next’. What's wrong with it is that it works only on a dead-end Python that everyone should be busily migrating away from. (And I see Paul was later made aware of that. So, we all win! :-) -- \ “I was gratified to be able to answer promptly and I did. I | `\ said I didn't know.” —Mark Twain, _Life on the Mississippi_ | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list