On Jun 9, 3:29 am, Jussi Piitulainen
wrote:
> Here's something you could have thought of for yourself even when you
> didn't remember that Python does have special built-in support for
> applying a function to a list of arguments:
>
> def five(func, args):
> a, b, c, d, e = args
> return fu
On Sat, Jun 9, 2012 at 6:29 PM, Jussi Piitulainen
wrote:
> The point is that the function itself can be passed as an argument to
> the auxiliary function ...
And unlike in Javascript, a bound method is fully callable too.
Chris Angelico
--
http://mail.python.org/mailman/listinfo/python-list
stayvoid writes:
> > You want to unpack the list:
> >
> > function(*a) # like function(a[0], a[1], a[2], ...)
>
> Awesome! I forgot about this.
Here's something you could have thought of for yourself even when you
didn't remember that Python does have special built-in support for
applying a fun
> You want to unpack the list:
>
> function(*a) # like function(a[0], a[1], a[2], ...)
Awesome! I forgot about this.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 08 Jun 2012 16:41:40 -0700, stayvoid wrote:
> Hello,
>
> I want to pass several values to a function which is located on a server
> (so I can't change its behavior). That function only accepts five values
> which must be ints.
>
> There are several lists:
> a = [1, 2, 3, 4, 5]
> b = [5,
On Fri, Jun 8, 2012 at 7:41 PM, stayvoid wrote:
> Hello,
>
> I want to pass several values to a function which is located on a
> server (so I can't change its behavior).
> That function only accepts five values which must be ints.
>
> There are several lists:
> a = [1, 2, 3, 4, 5]
> b = [5, 4, 3,
On Fri, Jun 8, 2012 at 5:41 PM, stayvoid wrote:
> Hello,
>
> I want to pass several values to a function which is located on a
> server (so I can't change its behavior).
> That function only accepts five values which must be ints.
>
> There are several lists:
> a = [1, 2, 3, 4, 5]
> b = [5, 4, 3,
Hello,
I want to pass several values to a function which is located on a
server (so I can't change its behavior).
That function only accepts five values which must be ints.
There are several lists:
a = [1, 2, 3, 4, 5]
b = [5, 4, 3, 2, 1]
c = [0, 0, 0, 0, 0]
I want to pass each value from these l