- no need to override __setitem__() anymore, all helper classes query
authorMark Huang <mlhuang@cs.princeton.edu>
Mon, 2 Oct 2006 16:05:21 +0000 (16:05 +0000)
committerMark Huang <mlhuang@cs.princeton.edu>
Mon, 2 Oct 2006 16:05:21 +0000 (16:05 +0000)
  the DB schema for valid fields now

PLC/Table.py

index 04b45e7..ddc5f88 100644 (file)
@@ -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