Starap function exists but it seems there's not such thing as "doublestarmap"

Hello. I have a following question: How come there's no such thing in Python like starmap but which unpacks dicts as kwargs for fuction? For example I have a format string like "{param1}, {param2}" and want to get results passing list of dicts for it's .format(). Of course I can do that with genexpr or some lambda with map. But can you clarify why starmap version of map fuction exists and doublestarmap doesn't? Best Regards.

robertvandeneynde.be Le mer. 10 avr. 2019 à 12:55, Krokosh Nikita <de.lsnk@gmail.com> a écrit :
I need smth like starstarmap('{a} / {b}/ {c}'.format, [{a:1, b:2, c:3}, {a:4, b:5, c:6}, ...])
That's def starstarmap(f, it): return (f(**x) for x in it) That looks like a recipe, not a basis function ^^

robertvandeneynde.be Le mer. 10 avr. 2019 à 12:55, Krokosh Nikita <de.lsnk@gmail.com> a écrit :
I need smth like starstarmap('{a} / {b}/ {c}'.format, [{a:1, b:2, c:3}, {a:4, b:5, c:6}, ...])
That's def starstarmap(f, it): return (f(**x) for x in it) That looks like a recipe, not a basis function ^^
participants (4)
-
Anders Hovmöller
-
Krokosh Nikita
-
Robert Vanden Eynde
-
Serhiy Storchaka