docstr: Boolean are possible index.
  
  >>> import gast as ast
  >>> from pythran import passmanager, backend
  >>> node = ast.parse('''
  ... def foo():
  ...     a = 2 or 3
  ...     b = 4 or 5
  ...     c = a < b
  ...     d = b < 3
  ...     e = b == 4''')
  >>> pm = passmanager.PassManager("test")
  >>> res = pm.gather(RangeValues, node)
  >>> res['c']
  Interval(low=1, high=1)
  >>> res['d']
  Interval(low=0, high=0)
  >>> res['e']
  Interval(low=0, high=1)
docstr_tok: ["Boolean","are","possible","index",".",">",">",">","import","gast","as","ast",">",">",">","from","pythran","import","passmanager",",","backend",">",">",">","node","=","ast.parse","(","``","'","...","def","foo","(",")",":","...","a","=","2","or","3","...","b","=","4","or","5","...","c","=","a","<","b","...","d","=","b","<","3","...","e","=","b","==","4","''","'",")",">",">",">","pm","=","passmanager.PassManager","(","``","test","''",")",">",">",">","res","=","pm.gather","(","RangeValues",",","node",")",">",">",">","res","[","'","c","'","]","Interval","(","low=1",",","high=1",")",">",">",">","res","[","'d","'","]","Interval","(","low=0",",","high=0",")",">",">",">","res","[","'","e","'","]","Interval","(","low=0",",","high=1",")"]
code: def visit_Compare(self, node):
      """Boolean are possible index.
  
      >>> import gast as ast
      >>> from pythran import passmanager, backend
      >>> node = ast.parse('''
      ... def foo():
      ...     a = 2 or 3
      ...     b = 4 or 5
      ...     c = a < b
      ...     d = b < 3
      ...     e = b == 4''')
      >>> pm = passmanager.PassManager("test")
      >>> res = pm.gather(RangeValues, node)
      >>> res['c']
      Interval(low=1, high=1)
      >>> res['d']
      Interval(low=0, high=0)
      >>> res['e']
      Interval(low=0, high=1)
      """
      if any(
          isinstance(op, (ast.In, ast.NotIn, ast.Is, ast.IsNot))
          for op in node.ops
      ):
          self.generic_visit(node)
          return self.add(node, Interval(0, 1))
  
      curr = self.visit(node.left)
      res = []
      for op, comparator in zip(node.ops, node.comparators):
          comparator = self.visit(comparator)
          fake = ast.Compare(
              ast.Name("x", ast.Load(), None, None),
              [op],
              [ast.Name("y", ast.Load(), None, None)],
          )
          fake = ast.Expression(fake)
          ast.fix_missing_locations(fake)
          expr = compile(
              ast.gast_to_ast(fake), "<range_values>", "eval"
          )
          res.append(eval(expr, {"x": curr, "y": comparator}))
      if all(res):
          return self.add(node, Interval(1, 1))
      elif any(r.low == r.high == 0 for r in res):
          return self.add(node, Interval(0, 0))
      else:
          return self.add(node, Interval(0, 1))
  
imports: import gast
  from collections import defaultdict
  from functools import reduce
  from pythran.analyses import Aliases, CFG
  from pythran.intrinsic import Intrinsic
  from pythran.passmanager import ModuleAnalysis
  from pythran.interval import Interval, IntervalTuple, UNKNOWN_RANGE
  from pythran.tables import MODULES, attributes
label_desc: Use image node_id 9 for calling the RangeValuesBase obj's underlying member method code with example usage: obj.visit_Compare(node) and returns: self, self, self, self