Raises ValueError if 2 arguments are not passed to an XOR

def _validate_xor_args(self, p):
        """
        Raises ValueError if 2 arguments are not passed to an XOR
        """
        if len(p[1]) != 2:
            raise ValueError('Invalid syntax: XOR only accepts 2 arguments, got {0}: {1}'.format(len(p[1]), p))