On 1 Ekim, 18:13, Bruno Desthuilliers <bruno. [EMAIL PROTECTED]> wrote: > J. Clifford Dyer a écrit : > > > On Mon, Oct 01, 2007 at 03:50:59PM +0200, Bruno Desthuilliers wrote > > regarding Re: Select as dictionary...: > >> IIRC, postgres' db-api connector (well, at least one of them - I don't > >> know which one you're using) has a DictCursor. You should find all you > >> want to know in the relevant doc. > > > Correct me if I'm wrong, but I think the DictCursor would output the > > following: > > > [{'id': 1, 'value': 5}, {'id': 2, 'value': 5}, ...] > > > But the OP wanted one dict with IDs as keys: > > > {1: 5, 2: 5, ...} > > Hmmm... I did answer too fast, indeed. Thanks for pointing that out.
Very very very thanks to everybody. I'm a new user in this group and you are wonderfull persons :)
-- http://mail.python.org/mailman/listinfo/python-list