Proposed new syntax
Ben Finney
ben+python at benfinney.id.au
Tue Aug 22 21:46:18 EDT 2017
Stephan Houben <stephanh42 at gmail.com.invalid> writes:
> I have often done things like:
>
> generate_id = itertools.count().__next__
Could you be convinced to instead do::
import functools
import itertools
generate_id = functools.partial(next, itertools.count())
--
\ “The right to search for truth implies also a duty; one must |
`\ not conceal any part of what one has recognized to be true.” |
_o__) —Albert Einstein |
Ben Finney
More information about the Python-list
mailing list