diff --git a/ChangeLog b/ChangeLog index c12d6b64..604447a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-05-10 Federico Di Gregorio + + * lib/extras.py: applied DictRow "diet" patch from Marko Kreen. + 2009-04-21 Federico Di Gregorio * setup.py: applied patch from Elvis Pranskevichus to make diff --git a/lib/extras.py b/lib/extras.py index 4a845ba4..d6337ac6 100644 --- a/lib/extras.py +++ b/lib/extras.py @@ -107,6 +107,8 @@ class DictCursor(DictCursorBase): class DictRow(list): """A row object that allow by-colun-name access to data.""" + __slots__ = ('_index',) + def __init__(self, cursor): self._index = cursor.index self[:] = [None] * len(cursor.description) @@ -191,6 +193,9 @@ class RealDictCursor(DictCursorBase): self._query_executed = 0 class RealDictRow(dict): + + __slots__ = ('_column_mapping',) + def __init__(self, cursor): dict.__init__(self) self._column_mapping = cursor.column_mapping