From: Mark Huang Date: Mon, 2 Oct 2006 16:05:21 +0000 (+0000) Subject: - no need to override __setitem__() anymore, all helper classes query X-Git-Tag: pycurl-7_13_1~681 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=13c265f9cbbb598afbae59748d0cbec896d729f1;p=plcapi.git - no need to override __setitem__() anymore, all helper classes query the DB schema for valid fields now --- diff --git a/PLC/Table.py b/PLC/Table.py index 04b45e77..ddc5f88a 100644 --- a/PLC/Table.py +++ b/PLC/Table.py @@ -9,22 +9,6 @@ class Row(dict): # fields (e.g., joined fields) may be updated via sync(). fields = {} - def __init__(self, fields): - self.update(fields) - - def update(self, fields): - for key, value in fields.iteritems(): - self.__setitem__(key, value) - - def __setitem__(self, key, value): - """ - Magically takes care of aggregating certain variables into - lists. - """ - - if key in self.fields: - dict.__setitem__(self, key, value) - def validate(self): """ Validates values. Will validate a value with a custom function