Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53156
| Path | csiph.com!usenet.pasdenom.info!aioe.org!rt.uk.eu.org!weretis.net!feeder1.news.weretis.net!news.tota-refugium.de!.POSTED!not-for-mail |
|---|---|
| From | Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> |
| Newsgroups | comp.lang.python |
| Subject | Re: Is there a function that applies list of functions to a value? |
| Date | Wed, 28 Aug 2013 15:09:58 +0200 |
| Organization | A not so newly installed InterNetNews server |
| Lines | 19 |
| Message-ID | <kvksrc$6lr$1@r01.glglgl.de> (permalink) |
| References | <aa168508-c469-4b02-9dc1-e0efd023d52b@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | tota-refugium.de 1377696002 15416 eJwVy8kRxEAIBLCUBoYGdzgcJv8QvFt6C9fFO8zhhsWazLQ/hs57fvriJBKPjMZNT12vfKs0ctUllSwBAQZ1dd7e/yIjT7PYtieaxyblMj6A8h3q (28 Aug 2013 13:20:02 GMT) |
| X-Complaints-To | abuse@news.tota-refugium.de |
| NNTP-Posting-Date | Wed, 28 Aug 2013 13:20:02 +0000 (UTC) |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 Hamster/2.1.0.11 |
| X-User-ID | eJwFwQERACAIA8BKMMbAOKhn/wj+Z8h1ikoxX76xwnRlOKMcCtSsbjuDmzJioQFtFtvfvh/tAw99 |
| In-Reply-To | <aa168508-c469-4b02-9dc1-e0efd023d52b@googlegroups.com> |
| Cancel-Lock | sha1:xOm8lYchrKWelSDOBPCQ3FidV5M= |
| X-NNTP-Posting-Host | eJwNycEBwCAIA8CVBAOEcURk/xHa+55tF78BN4eNjV9PxlYtHJ9HXaZeI/7n2U/lrWOwntOm2JXVBCfKMvCsk2QIhMxaFVeRiwXJ2zKS7wNmIh1c |
| Xref | csiph.com comp.lang.python:53156 |
Show key headers only | View raw
Am 2013-08-28 14:52 schrieb AdamKal: > Hi, > > From time to time I have to apply a series of functions to a value in such a way: > > func4(func3(func2(func1(myval)))) > > I was wondering if there is a function in standard library that would take a list of functions and a initial value and do the above like this: > > func_im_looking_for([func1, func2, func3, func4], myval) > > I looked in itertools but nothing seamed to do the job. This seams like something vary obvious that was needed many times elsewhere so maybe you could help me? reduce(lambda x, f: f(x), funcs, myval) would do the job. Thomas
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is there a function that applies list of functions to a value? AdamKal <adamkalinski@gmail.com> - 2013-08-28 05:52 -0700
Re: Is there a function that applies list of functions to a value? Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-08-28 16:10 +0300
Re: Is there a function that applies list of functions to a value? fp2161@gmail.com - 2013-08-29 15:48 -0700
Re: Is there a function that applies list of functions to a value? Tim Chase <python.list@tim.thechases.com> - 2013-08-28 08:11 -0500
Re: Is there a function that applies list of functions to a value? Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2013-08-28 16:19 +0300
Re: Is there a function that applies list of functions to a value? AdamKal <adamkalinski@gmail.com> - 2013-08-28 06:23 -0700
Re: Is there a function that applies list of functions to a value? Chris Angelico <rosuav@gmail.com> - 2013-08-28 23:26 +1000
Re: Is there a function that applies list of functions to a value? Tim Chase <python.list@tim.thechases.com> - 2013-08-28 08:43 -0500
Re: Is there a function that applies list of functions to a value? AdamKal <adamkalinski@gmail.com> - 2013-08-28 06:50 -0700
Re: Is there a function that applies list of functions to a value? ishish <ishish@domhain.de> - 2013-08-28 14:17 +0100
Re: Is there a function that applies list of functions to a value? Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2013-08-28 15:09 +0200
Re: Is there a function that applies list of functions to a value? Josh English <Joshua.R.English@gmail.com> - 2013-08-28 11:50 -0700
Re: Is there a function that applies list of functions to a value? fp2161@gmail.com - 2013-08-29 23:17 -0700
Re: Is there a function that applies list of functions to a value? alex23 <wuwei23@gmail.com> - 2013-08-30 16:36 +1000
Re: Is there a function that applies list of functions to a value? Fabrice Pombet <fp2161@gmail.com> - 2013-08-30 01:11 -0700
Re: Is there a function that applies list of functions to a value? fp2161@gmail.com - 2013-08-29 13:50 -0700
Re: Is there a function that applies list of functions to a value? Chris Angelico <rosuav@gmail.com> - 2013-08-30 07:05 +1000
Re: Is there a function that applies list of functions to a value? fp2161@gmail.com - 2013-08-29 14:27 -0700
Re: Is there a function that applies list of functions to a value? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-08-30 02:18 +0000
Re: Is there a function that applies list of functions to a value? Chris Angelico <rosuav@gmail.com> - 2013-08-30 07:35 +1000
Re: Is there a function that applies list of functions to a value? fp2161@gmail.com - 2013-08-29 23:14 -0700
Re: Is there a function that applies list of functions to a value? alex23 <wuwei23@gmail.com> - 2013-08-30 16:23 +1000
Re: Is there a function that applies list of functions to a value? Fabrice Pombet <fp2161@gmail.com> - 2013-08-30 01:06 -0700
Re: Is there a function that applies list of functions to a value? fp2161@gmail.com - 2013-08-29 14:48 -0700
Re: Is there a function that applies list of functions to a value? Terry Reedy <tjreedy@udel.edu> - 2013-08-30 00:38 -0400
Re: Is there a function that applies list of functions to a value? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-08-30 02:09 +0000
Re: Is there a function that applies list of functions to a value? fp2161@gmail.com - 2013-08-29 23:06 -0700
csiph-web