SE/relacion.py
def rename(self, params):
        '''Returns a new header, with renamed fields.

        params is a dictionary of {old:new} names
        '''
        attrs = list(self)
        for old, new in params.items():
            if not is_valid_relation_name(new):
                raise Exception('%s is not a valid attribute name' % new)
            try:
                id_ = attrs.index(old)
                attrs[id_] = new
            except:
                raise Exception('Field not found: %s' % old)
        return Header(attrs)
Returns a new header, with renamed fields.

        params is a dictionary of {old:new} names
        
Returns a new header, with renamed fields.
params is a dictionary of {old:new} names
Returns a new header with renamed fields . params is a dictionary of { old : new } names
def rename(self, params):
        attrs = list(self)
        for old, new in params.items():
            if not is_valid_relation_name(new):
                raise Exception('%s is not a valid attribute name' % new)
            try:
                id_ = attrs.index(old)
                attrs[id_] = new
            except:
                raise Exception('Field not found: %s' % old)
        return Header(attrs)
def rename ( self , params ) : attrs = list ( self ) for old , new in params . items ( ) : if not is_valid_relation_name ( new ) : raise Exception ( '%s is not a valid attribute name' % new ) try : id_ = attrs . index ( old ) attrs [ id_ ] = new except : raise Exception ( 'Field not found: %s' % old ) return Header ( attrs )
Returns a new header, with renamed fields.
Returns a new header with renamed fields .
'''Returns a new header, with renamed fields.

        params is a dictionary of {old:new} names
        '''
self
params