dingykhan1 / scoop

Automatically exported from code.google.com/p/scoop
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Problem passing kwargs using futures.map #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Run futures.map with a function with both iterator and keyword arguments
2.  return value from function

What is the expected output? What do you see instead?

should run correctly giving output of program. Instead I get

TypeError: submit() got an unexpected keyword argument 

What version of the product are you using? On what operating system?
0.7.0 RC

Please provide any additional information below.
I've attached a futures.py that seems to have fixed the problem.

Original issue reported on code.google.com by Dr.Dange...@gmail.com on 8 Oct 2013 at 2:35

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for your feedback.

The logic behind the removal was the ambiguity that it raises while using the 
map() function. More precisely, if elements in kwargs are iterables, should 
they be distributed or broadcast? In fact, **kwargs was never there in the 
first place in the futures standard ( PEP-3148: 
http://legacy.python.org/dev/peps/pep-3148/ ). If you need such a functionality 
for the map() function, the developer team agreed that applying a partial to it 
would be the most explicit way to do it (see 
https://docs.python.org/3/library/functools.html#functools.partial ).

Feel free to discuss this design modification; I will be glad to take 
constructive input and include it in the source code.

Original comment by yannickh...@gmail.com on 15 Jul 2014 at 5:28