Tuple unpacking inside lambda expressions

Antoon Pardon antoon.pardon at vub.be
Tue Apr 19 07:02:16 EDT 2022


Op 16/04/2022 om 23:36 schreef Sam Ezeh:
> Two questions here.
>
> Firstly, does anybody know of existing discussions (e.g. on here or on
> python-ideas) relating to unpacking inside lambda expressions?
>
> I found myself wanting to write the following.
>
> ```
> map(
>      lambda (module, data): result.process(module, data),
>       jobs
> )
> ```
> However, it's of course not legal Python syntax.

Why not write:

itertools.starmap(result.process, jobs)



More information about the Python-list mailing list