Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #52155
| References | (4 earlier) <021dfe24-af83-4307-856e-441cf35cb93a@googlegroups.com> <mailman.311.1375868873.1251.python-list@python.org> <13807c2e-7f9f-45dd-b36e-4cdc7cde6709@googlegroups.com> <mailman.314.1375876463.1251.python-list@python.org> <f290cfce-132c-4c0f-a2ac-b62c4337a73f@googlegroups.com> |
|---|---|
| From | Joshua Landau <joshua@landau.ws> |
| Date | 2013-08-07 23:49 +0100 |
| Subject | Re: Using Pool map with a method of a class and a list |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.331.1375915830.1251.python-list@python.org> (permalink) |
On 7 August 2013 23:26, Luca Cerone <luca.cerone@gmail.com> wrote:
> Thanks for the post.
> I actually don't know exactly what can and can't be pickles..
I just try it and see what works ;).
The general idea is that if it is module-level it can be pickled and
if it is defined inside of something else it cannot. It depends
though.
> not what partialing a function means..
"partial" takes a function and returns it with arguments "filled in":
from functools import partial
def add(a, b):
return a + b
add5 = partial(add, 5)
print(add5(10)) # Returns 15 == 5 + 10
> Maybe can you link me to some resources?
http://docs.python.org/2/library/functools.html#functools.partial
> I still can't understand all the details in your code :)
Never mind that, though, as Peter Otten's code (with my very minor
suggested modifications) if by far the cleanest method of the two and
is arguably more correct too.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Using Pool map with a method of a class and a list Luca Cerone <luca.cerone@gmail.com> - 2013-08-06 10:12 -0700
Re: Using Pool map with a method of a class and a list Chris Angelico <rosuav@gmail.com> - 2013-08-06 18:38 +0100
Re: Using Pool map with a method of a class and a list Luca Cerone <luca.cerone@gmail.com> - 2013-08-06 12:42 -0700
Re: Using Pool map with a method of a class and a list Joshua Landau <joshua@landau.ws> - 2013-08-07 07:48 +0100
Re: Using Pool map with a method of a class and a list Luca Cerone <luca.cerone@gmail.com> - 2013-08-07 01:33 -0700
Re: Using Pool map with a method of a class and a list Joshua Landau <joshua@landau.ws> - 2013-08-07 10:47 +0100
Re: Using Pool map with a method of a class and a list Luca Cerone <luca.cerone@gmail.com> - 2013-08-07 03:10 -0700
Re: Using Pool map with a method of a class and a list Joshua Landau <joshua@landau.ws> - 2013-08-07 12:53 +0100
Re: Using Pool map with a method of a class and a list Luca Cerone <luca.cerone@gmail.com> - 2013-08-07 15:26 -0700
Re: Using Pool map with a method of a class and a list Joshua Landau <joshua@landau.ws> - 2013-08-07 23:49 +0100
Re: Using Pool map with a method of a class and a list Peter Otten <__peter__@web.de> - 2013-08-07 16:46 +0200
Re: Using Pool map with a method of a class and a list Joshua Landau <joshua@landau.ws> - 2013-08-07 16:52 +0100
Re: Using Pool map with a method of a class and a list Peter Otten <__peter__@web.de> - 2013-08-07 18:15 +0200
Re: Using Pool map with a method of a class and a list Luca Cerone <luca.cerone@gmail.com> - 2013-08-07 16:31 -0700
Re: Using Pool map with a method of a class and a list Luca Cerone <luca.cerone@gmail.com> - 2013-08-06 12:37 -0700
csiph-web