public inbox for [email protected]
help / color / mirror / Atom feedFrom: Karsten Hilbert <[email protected]>
To: [email protected]
Subject: Re: iterating over DictRow
Date: Thu, 24 Sep 2020 23:11:47 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <AM0PR07MB4036EA8B58205084F30DA2AC87390@AM0PR07MB4036.eurprd07.prod.outlook.com>
References: <[email protected]>
<AM0PR07MB4036EA8B58205084F30DA2AC87390@AM0PR07MB4036.eurprd07.prod.outlook.com>
On Thu, Sep 24, 2020 at 02:53:40PM +0000, David Raymond wrote:
> Since DictRow's can be indexed by either the field name or
> the field index (either record["ID"] or record[0]) then I
> think what it "should" be is a little ambiguous.
I eventually thought so. I was, however, wondering whether I
should have _expected_ iteration over a DictRow to be a list
iteration.
Either of those
> for field in dict(the_dict):
> for field in the_dict.keys():
work, however (or RealDictCursor, for that matter).
Thanks all,
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
view thread (12+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: iterating over DictRow
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox