A.M wrote: > Is there any built-in Hash implementation in Python? I am looking for a > container that I can access to it's items by name. Something like this: > > Print container["memeberName"]
d = {"memberName" : "some value"} print d["memberName"] > I am asking this because I learned that DB-API in Python doesn't offer > access to cursor columns by name. The only option is access by index. I hope > that I've got it wrong! > > I learned Ruby perfectly supports that. Python does not use column names by default because they are not portable across database implementations. That being said, you can get them easily, if you want. Look at the "description" attribute of your cursor instance. Cheers, Brian -- http://mail.python.org/mailman/listinfo/python-list