Proposed new syntax

Marko Rauhamaa marko at pacujo.net
Thu Aug 24 05:58:13 EDT 2017


Paul Rubin <no.email at nospam.invalid>:

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

I don't like lambda in Python. However, I like it better than
functools.partial.

Best of all, define an inner function.


Marko



More information about the Python-list mailing list