[DB-SIG] fetchone -> dictionary?

Stephen Ng stephenng@my-dejanews.com
Wed, 20 Jan 1999 14:35:40 -0000


I'm just getting started with this stuff, so sorry if this is a newbie question/suggestion.

Why not have a flavor of fetchone() which returns a dictionary instead a sequence?  Then we could write:  

row = dfetchone()
print row['FieldName']

instead of 

print row[SomeConstantWhichMightChange]

Perhaps dfetchall could be implemented as an array of dictionaries?

Steve Ng






-----== Sent via Deja News, The Discussion Network ==-----
http://www.dejanews.com/  Easy access to 50,000+ discussion forums