On 20/04/2022 13:01, Sam Ezeh 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?
Hm, I don'
On Apr 20, 2022 13:01, Sam Ezeh 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
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?
Kind Regards,
Sam Ezeh
On Sat, 16 Apr 2022 at 22:
This also works great!
Kind Regards,
Sam Ezeh
On Tue, 19 Apr 2022 at 12:03, Antoon Pardon wrote:
>
> 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 lamb
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(
> In general, if you're using map() with a lambda function, it's often
simpler to switch to a comprehension.
Oh, of course, completely went past my head.
> [result.process(module, data) for module, data in jobs]
And this works great, thanks!
On Sat, 16 Apr 2022 at 22:42, Chris Angelico wrote:
On Sun, 17 Apr 2022 at 07:37, Sam Ezeh wrote:
>
> 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,
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