Re: [cx-oracle-users] looking for a quicker / more elegant way to form objects with attributes out
Brought to you by:
atuining
From: Amaury F. d'A. <ama...@gm...> - 2011-03-03 13:50:16
|
2011/3/3 Massa, Harald Armin <ch...@gh...>: > So I am still missing out a more elegant way to have those columns > transformed to attributes of an object... Isn't the namedtuple solution enough? it allows both attribute access and number-based index. Your use case is even mentioned in the namedtuple documentation: http://docs.python.org/dev/library/collections.html#collections.namedtuple (look for the "sqlite" example) -- Amaury Forgeot d'Arc |