SE/relacion.py
def product(self, other):
        '''
        Cartesian product. Attributes of the relations must differ.
        '''

        if (not isinstance(other, relation)):
            raise Exception('Operand must be a relation')
        if self.header.sharedAttributes(other.header) != 0:
            raise Exception(
                'Unable to perform product on relations with colliding attributes'
            )
        newt = relation()
        newt.header = Header(self.header + other.header)

        for i in self.content:
            for j in other.content:
                newt.content.add(i + j)
        return newt

        Cartesian product. Attributes of the relations must differ.
        
Cartesian product. Attributes of the relations must differ.
Cartesian product . Attributes of the relations must differ .
def product(self, other):
        if (not isinstance(other, relation)):
            raise Exception('Operand must be a relation')
        if self.header.sharedAttributes(other.header) != 0:
            raise Exception(
                'Unable to perform product on relations with colliding attributes'
            )
        newt = relation()
        newt.header = Header(self.header + other.header)
        for i in self.content:
            for j in other.content:
                newt.content.add(i + j)
        return newt
def product ( self , other ) : if ( not isinstance ( other , relation ) ) : raise Exception ( 'Operand must be a relation' ) if self . header . sharedAttributes ( other . header ) != 0 : raise Exception ( 'Unable to perform product on relations with colliding attributes' ) newt = relation ( ) newt . header = Header ( self . header + other . header ) for i in self . content : for j in other . content : newt . content . add ( i + j ) return newt
Cartesian product.
Cartesian product .
'''
        Cartesian product. Attributes of the relations must differ.
        '''
self
other