Re: why is self not passed to id()?

2008-09-04 Thread Maric Michaud
Le Thursday 04 September 2008 23:35:18 Terry Reedy, vous avez écrit : > Maric Michaud wrote: > > Le Thursday 04 September 2008 22:26:53 Ruediger, vous avez écrit : > >> class foo(list): > >>     __hash__ = lambda x: id(x) > > > > Wow ! You are really going on

Re: Case-insensitive string compare?

2008-09-04 Thread Maric Michaud
an one brain cycle to achieve. Try the regexp solution and make your choice, more than often, I keep the straightforward, "read as pseudo-code", python expression. -- _ Maric Michaud -- http://mail.python.org/mailman/listinfo/python-list

Re: Case-insensitive string compare?

2008-09-04 Thread Maric Michaud
.lower()] = (key,whatever) > "premature optimization is the root of all evil" I don't recall the OP wanted a (a bit) faster solution to his problem in counterpart of memory loss and syntax complication. If the OP's proposal seems already messy, how about ths one : if lib.lower() not in ( e[0] for e in stage_map.items() ) : ... > - Chris > > > -- > > http://mail.python.org/mailman/listinfo/python-list -- _ Maric Michaud -- http://mail.python.org/mailman/listinfo/python-list

Re: Case-insensitive string compare?

2008-09-05 Thread Maric Michaud
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 peop

Re: Case-insensitive string compare?

2008-09-05 Thread Maric Michaud
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. >

Re: Core dumped while interacting with OpenOffice.org via pyuno

2008-09-05 Thread Maric Michaud
here something else I should do in order to have more clues > ("Read The Fine Manual (tm)" is an acceptable answer) You can try to find which function call exactly provoke the exception, the simplest way is to trace execution flow with some print statments and using non forking zope ins

Re: Case-insensitive string compare?

2008-09-05 Thread Maric Michaud
e keys are case-sensitive, so this is not an option, the only way to do it fast is to index upon insertion all keys in another dict, so you get in final : d = { "kEy1" : 1, "Key1" : 2} indexes = { "key1" : ["kEy1", "Key1" ] } > Cheers, > Cliff > > > -- > http://mail.python.org/mailman/listinfo/python-list -- _ Maric Michaud -- http://mail.python.org/mailman/listinfo/python-list

Re: Case-insensitive string compare?

2008-09-05 Thread Maric Michaud
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

Re: Retrieving the name of the class calling an instance method

2008-09-05 Thread Maric Michaud
foo() > f.someMethod() > > class again(): > def __init__(self): > f = foo() > f.someMethod() > > bar() > again() > --- -- _ Maric Michaud -- http://mail.python.org/mailman/listinfo/python-list

Re: append on lists

2008-09-16 Thread Maric Michaud
Le Tuesday 16 September 2008 15:57:53 Grant Edwards, vous avez écrit : > On 2008-09-16, Maric Michaud <[EMAIL PROTECTED]> wrote: > > all expressions that return something, return a new object, > > That's not _quite_ true: > >>> a=1 > >>> b=

Re: literals optimization (was Re: append on lists)

2008-09-16 Thread Maric Michaud
Le Tuesday 16 September 2008 16:57:26 Grant Edwards, vous avez écrit : > On 2008-09-16, Maric Michaud <[EMAIL PROTECTED]> wrote: > > Le Tuesday 16 September 2008 15:57:53 Grant Edwards, vous avez écrit : > >> On 2008-09-16, Maric Michaud <[EMAIL PROTECTED]> wrot

Re: literals optimization (was Re: append on lists)

2008-09-16 Thread Maric Michaud
ame integer in some implementation is unrelated to the original problem. -- _ Maric Michaud -- http://mail.python.org/mailman/listinfo/python-list

Re: Case-insensitive string compare?

2008-09-16 Thread Maric Michaud
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 an

Re: Gateway to python-list is generating bounce messages.

2008-09-16 Thread Maric Michaud
Le Monday 15 September 2008 16:45:12 Maric Michaud, vous avez écrit : > This is not sufficient for auto-responses, and given the following rfcs, it > would smart to both : > ... > - add or modify the Return-Path and/or Reply-To header for badly > implemented auto-responders t

<    1   2   3