'Set the given name, using ``index`` to disambiguate.'

def set(self, name, value, index=None):

    if (index is None):
        self[name] = value
    else:
        fields = self.fields.get(name)
        assert (fields is not None), ('No    fields    found    matching    %r' % name)
        field = fields[index]
        field.value = value
