Le Friday 05 September 2008 19:36:56 Fredrik Lundh, vous avez écrit :
Maric Michaud wrote:
I suspect you are coming to conclusions a bit quickly, without taking the
pain of understanding the whole discussion.
I'm pretty sure I was the first one to post an answer in this thread,
and I
Maric Michaud wrote:
premature optimization is the root of all evil
So is use by that statement by people who don't have the slightest idea
about what it actually means.
The full version is
We should forget about small efficiencies, say about 97% of the time:
premature optimization is
Maric Michaud wrote:
You''ll often see for loops written like this :
for i in (e for e in iterable if predicate(e)) :
...
luckily, I don't. most people, when faced with that problem, writes it
in the obvious way:
for i in iterable:
if predicate(i):
...
to avoid
Le Friday 05 September 2008 08:30:44 Fredrik Lundh, vous avez écrit :
Maric Michaud wrote:
You''ll often see for loops written like this :
for i in (e for e in iterable if predicate(e)) :
...
luckily, I don't. most people, when faced with that problem, writes it
in the obvious
Le Friday 05 September 2008 08:24:29 Fredrik Lundh, vous avez écrit :
Maric Michaud wrote:
premature optimization is the root of all evil
So is use by that statement by people who don't have the slightest idea
about what it actually means.
The full version is
We should forget about small
On Thu, 2008-09-04 at 18:48 -0500, Robert Dailey wrote:
Thanks everyone for your help. I'm not opposed to using [key.lower()
for key in stage_map] at all, I was just curious to see if there were
any cleaner alternatives. It looks like that is what I'll be using.
I'm not familiar with how
Please keep the discussion on-list.
On Fri, 2008-09-05 at 15:36 +0200, Maric Michaud wrote:
Le Friday 05 September 2008 14:33:22 J. Clifford Dyer, vous avez écrit :
On Thu, 2008-09-04 at 18:48 -0500, Robert Dailey wrote:
Thanks everyone for your help. I'm not opposed to using [key.lower()
Le Friday 05 September 2008 14:33:22 J. Clifford Dyer, vous avez écrit :
On Thu, 2008-09-04 at 18:48 -0500, Robert Dailey wrote:
Thanks everyone for your help. I'm not opposed to using [key.lower()
for key in stage_map] at all, I was just curious to see if there were
any cleaner
Le Friday 05 September 2008 16:00:39 J. Cliff Dyer, vous avez écrit :
Please keep the discussion on-list.
Sorry for the private email, I sent it again to the list..
On Fri, 2008-09-05 at 15:36 +0200, Maric Michaud wrote:
Le Friday 05 September 2008 14:33:22 J. Clifford Dyer, vous avez écrit
Maric Michaud wrote:
I suspect you are coming to conclusions a bit quickly, without taking the pain
of understanding the whole discussion.
I'm pretty sure I was the first one to post an answer in this thread,
and I understand Python design and performance issues very well, thank you.
(but
Maric Michaud wrote:
Le Friday 05 September 2008 14:33:22 J. Clifford Dyer, vous avez écrit :
On Thu, 2008-09-04 at 18:48 -0500, Robert Dailey wrote:
Thanks everyone for your help. I'm not opposed to using [key.lower()
for key in stage_map] at all, I was just curious to see if there were
any
On Fri, Sep 5, 2008 at 12:36 PM, Fredrik Lundh [EMAIL PROTECTED]wrote:
Maric Michaud wrote:
I suspect you are coming to conclusions a bit quickly, without taking the
pain of understanding the whole discussion.
I'm pretty sure I was the first one to post an answer in this thread, and I
Hi,
I currently have a dictionary object that I'm doing the following with:
if lib not in stage_map:
# ... do stuff ...
However, this will perform a case-sensitive comparison between lib and each
key in stage_map. Is there a way to make this do a case-insensitive
comparison instead? Yes, I
On Thu, Sep 4, 2008 at 5:14 PM, Robert Dailey [EMAIL PROTECTED] wrote:
Hi,
I currently have a dictionary object that I'm doing the following with:
if lib not in stage_map:
# ... do stuff ...
However, this will perform a case-sensitive comparison between lib and each
key in stage_map.
Robert Dailey wrote:
I currently have a dictionary object that I'm doing the following with:
if lib not in stage_map:
# ... do stuff ...
However, this will perform a case-sensitive comparison between lib and
each key in stage_map. Is there a way to make this do a case-insensitive
On Thu, Sep 4, 2008 at 5:21 PM, Fredrik Lundh [EMAIL PROTECTED]wrote:
Robert Dailey wrote:
I currently have a dictionary object that I'm doing the following with:
if lib not in stage_map:
# ... do stuff ...
However, this will perform a case-sensitive comparison between lib and
each
Le Friday 05 September 2008 00:14:37 Robert Dailey, vous avez écrit :
Hi,
I currently have a dictionary object that I'm doing the following with:
if lib not in stage_map:
# ... do stuff ...
However, this will perform a case-sensitive comparison between lib and each
key in stage_map.
On Thu, Sep 4, 2008 at 3:37 PM, Robert Dailey [EMAIL PROTECTED] wrote:
On Thu, Sep 4, 2008 at 5:21 PM, Fredrik Lundh [EMAIL PROTECTED]
wrote:
Robert Dailey wrote:
I currently have a dictionary object that I'm doing the following with:
if lib not in stage_map:
# ... do stuff ...
Le Friday 05 September 2008 00:47:00 Chris Rebert, vous avez écrit :
On Thu, Sep 4, 2008 at 3:37 PM, Robert Dailey [EMAIL PROTECTED] wrote:
On Thu, Sep 4, 2008 at 5:21 PM, Fredrik Lundh [EMAIL PROTECTED]
wrote:
Robert Dailey wrote:
I currently have a dictionary object that I'm doing the
On Thu, Sep 4, 2008 at 5:59 PM, Maric Michaud [EMAIL PROTECTED] wrote:
Le Friday 05 September 2008 00:47:00 Chris Rebert, vous avez écrit :
Then store the string in its original case in the value part of the
key-value pair:
stage_map[key.lower()] = (key,whatever)
premature
20 matches
Mail list logo