That is very interesting John. Thanks!
Bernard
On 5/19/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Quoting Bernard Lebel <[EMAIL PROTECTED]>:
>
> > Well, that was a nice explanation. Thanks once again Kent!
>
> There is a nice (not too technical) essay on the running speeds of differ
Well, that was a nice explanation. Thanks once again Kent!
Bernard
On 5/16/05, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Bernard Lebel wrote:
> > Hi Kent,
> >
> > So if I undestand you right, mapping a function with map() when it is
> > a built-in function will/may be faster than a for loop, but
Bernard Lebel wrote:
> Hi Kent,
>
> So if I undestand you right, mapping a function with map() when it is
> a built-in function will/may be faster than a for loop, but if it's a
> custom function (ie. a def one), it will most likely be slower?
I guess I didn't proofread that last mail...what I me
Thanks Alan, that clears things up quite well.
Bernard
On 5/14/05, Alan Gauld <[EMAIL PROTECTED]> wrote:
> > So if I undestand you right, mapping a function with map()
> > when it is a built-in function will/may be faster than a for
> > loop, but if it's a custom function (ie. a def one), it wil
Hi Kent,
So if I undestand you right, mapping a function with map() when it is
a built-in function will/may be faster than a for loop, but if it's a
custom function (ie. a def one), it will most likely be slower?
Thanks
Bernard
On 5/13/05, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Bernard Lebe
Bernard Lebel wrote:
> The authors even go as far as saysing, on page 228 (first paragraph)
> that map() used that way has a performance benefit and is faster than
> a for loop.
That may well be correct, at least in the case where the function passed to map
is a builtin.
Mapping a builtin to ove
The authors even go as far as saysing, on page 228 (first paragraph)
that map() used that way has a performance benefit and is faster than
a for loop.
Cheers
Bernard
On 5/13/05, Alan Gauld <[EMAIL PROTECTED]> wrote:
> How bizarre. I'm astonished that Lutz/Ascher even show that as a means
> of
Alan Gauld wrote:
>>now I always used map() to perform a looped call on a function that
>>would change the attribute value, as shown in Mark Lutz & David
>>Ascher's Learning Python:
>>
>># Perform attribute value change on a single instance
>>def iterateInstances( oInstance ):
>> oInstance.va
> now I always used map() to perform a looped call on a function that
> would change the attribute value, as shown in Mark Lutz & David
> Ascher's Learning Python:
>
> # Perform attribute value change on a single instance
> def iterateInstances( oInstance ):
> oInstance.value = myValue
>
> #
-- Forwarded message --
Date: Wed, 11 May 2005 14:29:58 -0400
From: Bernard Lebel <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re: [Tutor] map() and lambda to change class instance attribute
Hi Danny,
Thanks for the answer.
I have to confess that I already use
10 matches
Mail list logo