Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #52155
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <joshua.landau.ws@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.069 |
| X-Spam-Evidence | '*H*': 0.86; '*S*': 0.00; 'arguments': 0.09; 'subject:method': 0.09; 'cc:addr:python-list': 0.11; 'def': 0.12; 'b):': 0.16; 'subject:class': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'import': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'suggested': 0.26; 'defined': 0.27; 'header:In- Reply-To:1': 0.27; 'idea': 0.28; 'function': 0.29; 'correct': 0.29; 'subject:list': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'too.': 0.31; 'minor': 0.31; 'post.': 0.31; 'though.': 0.31; 'url:python': 0.33; 'maybe': 0.34; 'subject:with': 0.35; "can't": 0.35; 'something': 0.35; 'received:google.com': 0.35; 'method': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'two': 0.37; 'depends': 0.38; 'url:library': 0.38; 'that,': 0.38; 'though,': 0.39; 'august': 0.61; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'details': 0.65; 'partial': 0.84; 'pickled': 0.84; 'subject:Using': 0.84; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=3Ypg2bXqHEXcsnqbrwyS2Kn2gjmozXzxE94jZkkOOcs=; b=S2ncf1LaKQCEckNcK+clSgSwNeZK9gCDG56G8dND/QPS0ZuGJwdCUbaC1gjoLCdkEr GosDHGrMmOSVOq2SKaqkJXHGgeTwyMv5WUUB92sW2jzmLlpw6xDNoJFTvFi3M8oql/G5 A00QtshNrdPoJVhcOqu+EfSaTZQ/mWlEMaDOMLdXB0sw2OJc3o1OTTTX8spIPDph2j+p 8eFNRXRMGJY/yD8t6kWlDScz9UB+hGy72k3XSL8rSTk61nSQBTR4U8UphI9wx0H9i8Hz dgtrnDrRXPZVmudyeAhrzj/v0IrMuLmPmHBlmqHDWgjipxoBHCngk66s/SqokS7wlcjd xgiQ== |
| X-Received | by 10.112.33.205 with SMTP id t13mr1169940lbi.22.1375915827271; Wed, 07 Aug 2013 15:50:27 -0700 (PDT) |
| MIME-Version | 1.0 |
| Sender | joshua.landau.ws@gmail.com |
| In-Reply-To | <f290cfce-132c-4c0f-a2ac-b62c4337a73f@googlegroups.com> |
| References | <96c575da-7601-4023-aa91-e80664f90333@googlegroups.com> <mailman.268.1375810736.1251.python-list@python.org> <4cff0d5e-33ab-42cd-b6d4-2b4fe235a274@googlegroups.com> <mailman.301.1375858161.1251.python-list@python.org> <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 | Wed, 7 Aug 2013 23:49:47 +0100 |
| X-Google-Sender-Auth | 9B9GnbxODCSPk7DbVwvjwgB6Cy0 |
| Subject | Re: Using Pool map with a method of a class and a list |
| To | Luca Cerone <luca.cerone@gmail.com> |
| Content-Type | text/plain; charset=UTF-8 |
| Cc | python-list <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.331.1375915830.1251.python-list@python.org> (permalink) |
| Lines | 33 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1375915830 news.xs4all.nl 15908 [2001:888:2000:d::a6]:47516 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:52155 |
Show key headers only | View raw
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