Ejemplo n.º 1
0
 def validate(self, value):
     if not isinstance(value, Table):
         # turn it into a table
         value = Table.from_dict(value, meta=self)
     else:
         # Check that it's using the same meta object
         assert self == value.meta, \
             "Supplied table with wrong meta type"
     # Check column lengths
     value.verify_column_lengths()
     return value