Next / Previous / Contents / Shipman's homepage

29.3. CollBind.combine()

The only binding that combines with a CollBind instance is another CollBind instance.

nomcompile3
# - - -   C o l l B i n d . c o m b i n e

    def combine ( self, other ):
        '''Form the union of two CollBind instances.
        '''
        if isinstance ( other, CollBind ):
            return CollBind ( self.abbr,
                self.collSet.union ( other.collSet ) )
        else:
            raise ValueError ( "Code '%s' is already defined as a "
                "collision code." % self.abbr )