summaryrefslogtreecommitdiff
path: root/lib/extras.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extras.py')
-rw-r--r--lib/extras.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/extras.py b/lib/extras.py
index 3e264a0..a494d8a 100644
--- a/lib/extras.py
+++ b/lib/extras.py
@@ -62,22 +62,22 @@ class DictRow(list):
"""A row object that allow by-colun-name access to data."""
def __init__(self, cursor):
- self._cursor = cursor
+ self._index = cursor.index
self[:] = [None] * len(cursor.description)
def __getitem__(self, x):
if type(x) != int:
- x = self._cursor.index[x]
+ x = self._index[x]
return list.__getitem__(self, x)
def items(self):
res = []
- for n, v in self._cursor.index.items():
+ for n, v in self._index.items():
res.append((n, list.__getitem__(self, v)))
return res
def keys(self):
- return self._cursor.index.keys()
+ return self._index.keys()