Logo Search packages:      
Sourcecode: relational version File versions  Download package

def relational::relation::relation::difference (   self,
  other 
)

Difference operation. The result will contain items present in first
operand but not in second one.
Will return an empty one if the second is a superset of first.
Will return None if headers are different.
It is possible to use projection and rename to make headers match.

Definition at line 215 of file relation.py.

00215                               :
        '''Difference operation. The result will contain items present in first
        operand but not in second one.
        Will return an empty one if the second is a superset of first.
        Will return None if headers are different.
        It is possible to use projection and rename to make headers match.'''
        other=self.rearrange(other) #Rearranges attributes' order
        if (self.__class__!=other.__class__)or(self.header!=other.header):
            return None
        newt=relation()
        newt.header=header(list(self.header.attributes))
        
        #Adds only element not in other, duplicating them
        for e in self.content:
            if e not in other.content:
                newt.content.append(list(e))
        return newt
    
    def union(self,other):


Generated by  Doxygen 1.6.0   Back to index