public inbox for [email protected]  
help / color / mirror / Atom feed
From: David Raymond <[email protected]>
To: [email protected] <[email protected]>
Subject: RE: iterating over DictRow
Date: Thu, 24 Sep 2020 14:53:40 +0000
Message-ID: <AM0PR07MB4036EA8B58205084F30DA2AC87390@AM0PR07MB4036.eurprd07.prod.outlook.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

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. But you can always either cast it to a dict, or iterate over .keys() if you want the field names.

for field in dict(the_dict):
    ...
or
for field in the_dict.keys():
   ...


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: <AM0PR07MB4036EA8B58205084F30DA2AC87390@AM0PR07MB4036.eurprd07.prod.outlook.com>

* 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