Re: how to for loop append a list [] when using parallel programming

2016-06-15 Thread meInvent bbird
is there like c# have concurrent list ?

i find something these, but how can it pass an initlist list variable

is it doing the same function as itertools.combinations ?

def comb(n, initlist): # the argument n is the number of items to select
res = list(itertools.combinations(initlist, n)) # create a list from the 
iterator
return res

#p = Pool(8)
#times = range(0, len(initlist)+1)  
  
#values = p.map(comb, times) # pass the range as the sequence of arguments!
#p.close()
#p.join()



On Thursday, June 16, 2016 at 11:17:47 AM UTC+8, John Gordon wrote:
> In  meInvent bbird 
>  writes:
> 
> > how to for loop append a list [] when using parallel programming
> 
> items = []
> for item in parallelized_object_factory():
> items.append(item)
> 
> If you want a more specific answer, ask a more specific question.
> 
> -- 
> John Gordon   A is for Amy, who fell down the stairs
> gor...@panix.com  B is for Basil, assaulted by bears
> -- Edward Gorey, "The Gashlycrumb Tinies"

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: how to for loop append a list [] when using parallel programming

2016-06-15 Thread John Gordon
In  meInvent bbird 
 writes:

> how to for loop append a list [] when using parallel programming

items = []
for item in parallelized_object_factory():
items.append(item)

If you want a more specific answer, ask a more specific question.

-- 
John Gordon   A is for Amy, who fell down the stairs
gor...@panix.com  B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"

-- 
https://mail.python.org/mailman/listinfo/python-list


how to for loop append a list [] when using parallel programming

2016-06-15 Thread meInvent bbird
how to for loop append a list [] when using parallel programming
-- 
https://mail.python.org/mailman/listinfo/python-list