Tuple unpacking inside lambda expressions
Albert-Jan Roskam
sjeik_appie at hotmail.com
Wed Apr 20 14:23:55 EDT 2022
On Apr 20, 2022 13:01, Sam Ezeh <sam.z.ezeh at gmail.com> wrote:
I went back to the code recently and I remembered what the problem was.
I was using multiprocessing.Pool.pmap which takes a callable (the
lambda here) so I wasn't able to use comprehensions or starmap
Is there anything for situations like these?
=====
Could it simply be:
multiprocessing.Pool.pmap(lambda job: result.process(*job), jobs)
More information about the Python-list
mailing list