SE/relacion.py
def _rearrange(self, other):
        '''If two relations share the same attributes in a different order, this method
        will use projection to make them have the same attributes' order.
        It is not exactely related to relational algebra. Just a method used
        internally.
        Will raise an exception if they don't share the same attributes'''
        if not isinstance(other, relation):
            raise TypeError('Expected an instance of the same class')
        elif self.header == other.header:
            return other
        elif self.header.sharedAttributes(other.header) == len(self.header):
            return other.projection(self.header)
        raise TypeError('Relations differ: [%s] [%s]' % (
            ','.join(self.header), ','.join(other.header)
        ))
If two relations share the same attributes in a different order, this method
        will use projection to make them have the same attributes' order.
        It is not exactely related to relational algebra. Just a method used
        internally.
        Will raise an exception if they don't share the same attributes
If two relations share the same attributes in a different order, this method
will use projection to make them have the same attributes' order.
It is not exactely related to relational algebra. Just a method used
internally.
Will raise an exception if they don't share the same attributes
If two relations share the same attributes in a different order this method will use projection to make them have the same attributes ' order . It is not exactely related to relational algebra . Just a method used internally . Will raise an exception if they don ' t share the same attributes
def _rearrange(self, other):
        if not isinstance(other, relation):
            raise TypeError('Expected an instance of the same class')
        elif self.header == other.header:
            return other
        elif self.header.sharedAttributes(other.header) == len(self.header):
            return other.projection(self.header)
        raise TypeError('Relations differ: [%s] [%s]' % (
            ','.join(self.header), ','.join(other.header)
        ))
def _rearrange ( self , other ) : if not isinstance ( other , relation ) : raise TypeError ( 'Expected an instance of the same class' ) elif self . header == other . header : return other elif self . header . sharedAttributes ( other . header ) == len ( self . header ) : return other . projection ( self . header ) raise TypeError ( 'Relations differ: [%s] [%s]' % ( ',' . join ( self . header ) , ',' . join ( other . header ) ) )
If two relations share the same attributes in a different order, this method
will use projection to make them have the same attributes' order.
If two relations share the same attributes in a different order this method will use projection to make them have the same attributes ' order .
'''If two relations share the same attributes in a different order, this method
        will use projection to make them have the same attributes' order.
        It is not exactely related to relational algebra. Just a method used
        internally.
        Will raise an exception if they don't share the same attributes'''
self
other