hwt/hdl/switchContainer.py
def _is_mergable(self, other) -> bool:
        """
        :return: True if other can be merged into this statement else False
        """
        if not isinstance(other, SwitchContainer):
            return False

        if not (self.switchOn is other.switchOn and
                len(self.cases) == len(other.cases) and
                self._is_mergable_statement_list(self.default, other.default)):
            return False

        for (vA, caseA), (vB, caseB) in zip(self.cases, other.cases):
            if vA != vB or not self._is_mergable_statement_list(caseA, caseB):
                return False

        return True
def _is_mergable(self, other) -> bool:
        """
        :return: True if other can be merged into this statement else False
        """
        if not isinstance(other, SwitchContainer):
            return False

        if not (self.switchOn is other.switchOn and
                len(self.cases) == len(other.cases) and
                self._is_mergable_statement_list(self.default, other.default)):
            return False

        for (vA, caseA), (vB, caseB) in zip(self.cases, other.cases):
            if vA != vB or not self._is_mergable_statement_list(caseA, caseB):
                return False

        return True
def _is_mergable ( self , other ) -> bool : if not isinstance ( other , SwitchContainer ) : return False if not ( self . switchOn is other . switchOn and len ( self . cases ) == len ( other . cases ) and self . _is_mergable_statement_list ( self . default , other . default ) ) : return False for ( vA , caseA ) , ( vB , caseB ) in zip ( self . cases , other . cases ) : if vA != vB or not self . _is_mergable_statement_list ( caseA , caseB ) : return False return True
:return: True if other can be merged into this statement else False
: return : True if other can be merged into this statement else False