xtuml/meta.py
def connect(self, instance, another_instance, check=True):
        '''
        Connect an *instance* to *another_instance*.
        
        Optionally, disable any cardinality *check* that would prevent the two
        instances from being connected.
        '''
        if instance not in self:
            self[instance] = xtuml.OrderedSet()
        
        if another_instance in self[instance]:
            return True
        
        if self[instance] and not self.many and check:
            return False  

        self[instance].add(another_instance)
        return True
def connect(self, instance, another_instance, check=True):
        '''
        Connect an *instance* to *another_instance*.
        
        Optionally, disable any cardinality *check* that would prevent the two
        instances from being connected.
        '''
        if instance not in self:
            self[instance] = xtuml.OrderedSet()
        
        if another_instance in self[instance]:
            return True
        
        if self[instance] and not self.many and check:
            return False  

        self[instance].add(another_instance)
        return True
def connect ( self , instance , another_instance , check = True ) : if instance not in self : self [ instance ] = xtuml . OrderedSet ( ) if another_instance in self [ instance ] : return True if self [ instance ] and not self . many and check : return False self [ instance ] . add ( another_instance ) return True
Connect an *instance* to *another_instance*.
        
        Optionally, disable any cardinality *check* that would prevent the two
        instances from being connected.
Connect an * instance * to * another_instance * . Optionally disable any cardinality * check * that would prevent the two instances from being connected .