Conversation
|
Just to give my 2 cents as a complete outsider, before I read up on the issue, I though that this function mapped and applied the arguments 2 layers deep. Something akin to iterating After reading the issue, it makes total sense. It seems that Python nomenclature calls the |
|
I'm very open to renaming it @bbayles What do you think? |
ergoithz
left a comment
There was a problem hiding this comment.
In case you didn't noticed, CI is complaining about your PR containing PEP8 violations, you'll have a higher chance of getting this PR approved after solving them. I annotated where those issues are coming from, hoping it helps.
| list(mi.doublestarmap(lambda a, b: a+b, iterable)) | ||
|
|
||
| def test_no_mapping(self): | ||
| iterable = [1,2,3,4] |
|
|
||
| def test_adding(self): | ||
| iterable = [{'a': 1, 'b': 2}, {'a': 3, 'b': 4}] | ||
| actual = list(mi.doublestarmap(lambda a, b: a+b, iterable)) |
There was a problem hiding this comment.
pep8 violation: add spaces around arithmetic operators
| @@ -4392,6 +4393,24 @@ def gray_product(*iterables): | |||
| f[j] = f[j + 1] | |||
| f[j + 1] = j + 1 | |||
|
|
|||
There was a problem hiding this comment.
pep8 violation: put two empty lines between module-level functions
| """ | ||
| for item in iterable: | ||
| yield function(**item) | ||
|
|
There was a problem hiding this comment.
pep8 violation: use two empty lines between module-level functions
Issue reference
Closes #679
Changes
Introduces
starstarmap