def __setattr__(self, name, values):
        """ Set all the attributes value

        >>> doc = Doc(docnum='1')
        >>> doc.terms = Text(multi=True, attrs={'tf': Numeric(default=1)}) 
        >>> doc.terms.add('computer', tf=12)
        >>> doc.terms.add('pad', tf=2)
        >>> doc.terms.tf = [3, 10]
        >>> doc.terms['computer'].tf
        3
        >>> doc.terms['pad'].tf
        10
        """
        if name.startswith('_'):
            DocField.__setattr__(self, name, values)
            #self.__dict__[attr] = value
        elif name in self.__dict__['_attrs']:
            if len(values) != len(self):
                raise SchemaError('Wrong size : |values| (=%s) should be equals to |keys| (=%s) ' \
                        % (len(values), len(self)))
            _attr = [DocField.FromType(self._ftype.attrs[name]) for _ in range(len(values)) ]
            for idx, val in enumerate(values):
                _attr[idx].set(val)
            self._attrs[name] = _attr
        else:
            raise SchemaError("No such attribute '%s' in Vector" % name)
def __setattr__ ( self , name , values ) : if name . startswith ( '_' ) : DocField . __setattr__ ( self , name , values ) elif name in self . __dict__ [ '_attrs' ] : if len ( values ) != len ( self ) : raise SchemaError ( 'Wrong size : |values| (=%s) should be equals to |keys| (=%s) ' % ( len ( values ) , len ( self ) ) ) _attr = [ DocField . FromType ( self . _ftype . attrs [ name ] ) for _ in range ( len ( values ) ) ] for idx , val in enumerate ( values ) : _attr [ idx ] . set ( val ) self . _attrs [ name ] = _attr else : raise SchemaError ( "No such attribute '%s' in Vector" % name )
Set all the attributes value

        >>> doc = Doc(docnum='1')
        >>> doc.terms = Text(multi=True, attrs={'tf': Numeric(default=1)}) 
        >>> doc.terms.add('computer', tf=12)
        >>> doc.terms.add('pad', tf=2)
        >>> doc.terms.tf = [3, 10]
        >>> doc.terms['computer'].tf
        3
        >>> doc.terms['pad'].tf
        10