def addMapField(self, name, aliases=None): if name not in self.fieldTypes: raise FieldError, 'field %s not found in %s' % (name, self.source) if aliases is None: aliases = (common.ORIGIN_MARKER + name, common.DESTINATION_MARKER + name) self.mappings.append((name, aliases, common.describeToField(self.fieldTypes[name])))
def addMapField(self, name, alias=None): if name not in self.fieldTypes: raise FieldError, 'field %s not found in %s' % (name, self.source) self.mappings.append((name, [(name if alias is None else alias)], common.describeToField(self.fieldTypes[name])))