On Tue, Aug 6, 2013 at 6:12 PM, Luca Cerone <luca.cer...@gmail.com> wrote: > from multiprocessing import Pool > > class A(object): > def __init__(self,x): > self.value = x > def fun(self,x): > return self.value**x > > > l = range(10) > > p = Pool(4) > > op = p.map(A.fun,l)
Do you ever instantiate any A() objects? You're attempting to call an unbound method without passing it a 'self'. You may find the results completely different in Python 2 vs Python 3, and between bound and unbound methods. In Python 3, an unbound method is simply a function. In both versions, a bound method carries its first argument around, so it has to be something different. Play around with it a bit. ChrisA -- http://mail.python.org/mailman/listinfo/python-list