Paul Rubin <no.email@nospam.invalid> writes:

> Ben Finney <ben+pyt...@benfinney.id.au> writes:
> >     generate_id = functools.partial(next, itertools.count())
>
> Is something wrong with:
>
>     >>> g = itertools.count().next

I wasn't looking for a ‘next’ method on the iterator. Is that special to
the ‘itertools.count’ type?

If so, I was attempting to give the more general solution to “how do I
get a function that will give me the next thing from this iterator”.

-- 
 \       “If consumers even know there's a DRM, what it is, and how it |
  `\     works, we've already failed.” —Peter Lee, Disney corporation, |
_o__)                                                             2005 |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to