Re: list comprehension (searching for onliners)

2006-10-20 Thread Carsten Haese
On Fri, 2006-10-20 at 10:53, Fredrik Lundh wrote: > if you want to become a good Python programmer, you really need to get > over that "I need a oneliner" idea. +1 QOTW -Carsten -- http://mail.python.org/mailman/listinfo/python-list

Re: list comprehension (searching for onliners)

2006-10-20 Thread Roberto Bonvallet
Gerardo Herzig wrote: [...] > and so on...what i need to do is some list comprehension that returns me > something like [...] You don't _need_ a list comprehension, you just _want_ one :) [...] > Ill keeping blew off my hair and drinking more cofee while searching for > this damn onliner im loo

Re: list comprehension (searching for onliners)

2006-10-20 Thread Fredrik Lundh
Gerardo Herzig wrote: > Thanks a lot dudes, i hope someday ill turn myself into some of you guys > who can actually answer questions ;) if you want to become a good Python programmer, you really need to get over that "I need a oneliner" idea. -- http://mail.python.org/mailman/listinfo/pyth

Re: list comprehension (searching for onliners)

2006-10-20 Thread Paul Rubin
Gerardo Herzig <[EMAIL PROTECTED]> writes: > You are the man, you are the man!! Yes, i need those dicts in order to > assign them to a nested for the htmltmpl templating > engine. Thats why i cant use the solution provided by Max, and thanks > to Jon too!! I'm confused, can't you write a multi-li

Re: list comprehension (searching for onliners)

2006-10-20 Thread Gerardo Herzig
You are the man, you are the man!! Yes, i need those dicts in order to assign them to a nested for the htmltmpl templating engine. Thats why i cant use the solution provided by Max, and thanks to Jon too!! Thanks a lot dudes, i hope someday ill turn myself into some of you guys who can actually

Re: list comprehension (searching for onliners)

2006-10-20 Thread Jon Clements
Gerardo Herzig wrote: > Hi all: I have this list thing as a result of a db.query: (short version) > result = [{'service_id' : 1, 'value': 10}, > {'service_id': 2, 'value': 5}, > {'service_id': 1, 'value': 15}, > {'service_id': 2, 'value': 15}, >

Re: list comprehension (searching for onliners)

2006-10-20 Thread Tim Chase
> result = [{'service_id' : 1, 'value': 10}, > {'service_id': 2, 'value': 5}, > {'service_id': 1, 'value': 15}, > {'service_id': 2, 'value': 15}, > ] > > and so on...what i need to do is some list comprehension that returns me > somethi

Re: list comprehension (searching for onliners)

2006-10-20 Thread Max Erickson
Gerardo Herzig <[EMAIL PROTECTED]> wrote: > Hi all: I have this list thing as a result of a db.query: (short > version) result = [{'service_id' : 1, 'value': 10}, > {'service_id': 2, 'value': 5}, > {'service_id': 1, 'value': 15}, > {'service_id': 2,

list comprehension (searching for onliners)

2006-10-20 Thread Gerardo Herzig
Hi all: I have this list thing as a result of a db.query: (short version) result = [{'service_id' : 1, 'value': 10}, {'service_id': 2, 'value': 5}, {'service_id': 1, 'value': 15}, {'service_id': 2, 'value': 15}, ] and so on...what i need