[DB-SIG] May we get an actual ANSWER to the F.A.Q...How can Iconstruct a dictionary???

Keating, Tim TKeating at origin.ea.com
Mon Sep 22 17:40:33 EDT 2003


It's not terribly hard to do by hand, which is probably why existing
modules that do it get little attention. Here are three that I found:

http://opensource.theopalgroup.com/ (See Python Database Row Module,
partway down the page)
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81252
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/163605

TK


-----Original Message-----
From: Vernon Cole [mailto:wnvcole at peppermillcas.com] 
Sent: Monday, September 22, 2003 4:22 PM
To: 'db-sig at python.org'
Subject: [DB-SIG] May we get an actual ANSWER to the F.A.Q...How can
Iconstruct a dictionary???


I have been away from the leading edge for a long time, and am trying to
jump back in and learn the new stuff. Python seems like a GREAT tool.
But.....

From:
	...PEP: 	249	
	...Title: 	Python Database API Specification v2.0	
	...Version: 	$Revision: 1.9 $	
I extract the following:	
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    Question: 

       How can I construct a dictionary out of the tuples returned by
       .fetchxxx():

    Answer:

       There are several existing tools available which provide
       helpers for this task. Most of them use the approach of using
       the column names defined in the cursor attribute .description
       as basis for the keys in the row dictionary.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Nice to hear that there are "several
existing tools".

I have been searching for a week now, but cannot find any of them.

Would someone be so kind as to actually publish a LIST of such tools??

	I find it difficult to believe that the "latest and greatest"
tools available in the 21st century still cannot return a value from a
named field (column) in one row of a  database. Good grief! How can I
NOT have a feature on a 256 MB Pentium in 2003 that I had on a 30 KB
PDP-11 in 1983?
	Was RDM _that_ far ahead of its time?
--------------
Vernon Cole
once (a long time ago) a developer of RDM.
wnvcole AT nospam.peppermillcas.com




_______________________________________________
DB-SIG maillist  -  DB-SIG at python.org
http://mail.python.org/mailman/listinfo/db-sig




More information about the DB-SIG mailing list