Select as dictionary...
duncan.booth at invalid.invalid
Mon Oct 1 16:08:19 CEST 2007
"J. Clifford Dyer" <jcd at sdf.lonestar.org> wrote:
> aia.execute("SELECT id, w from list")
> linkdict = dict()
> for k,v in links:
> linkdict[k] = v
> print linkdict
Wouldn't it be simpler just to do:
aia.execute("SELECT id, w from list")
even better would be to use an iterator to avoid fetching the entire
resultset as a list.
More information about the Python-list