@lower_builtin('is', types.Any, types.Any)
def generic_is(context, builder, sig, args):
 (lhs_type, rhs_type) = sig.args
 if (lhs_type == rhs_type):
  if lhs_type.mutable:
   raise NotImplementedError('no default `is` implementation')
  else:
   try:
    eq_impl = context.get_function('==', sig)
   except NotImplementedError:
    return cgutils.false_bit
   else:
    return eq_impl(builder, args)
 else:
  return cgutils.false_bit

@ lower_builtin ( 'is' , types . Any , types . Any ) def generic_is ( context , builder , sig , args ) : ( lhs_type , rhs_type ) = sig . args if ( lhs_type == rhs_type ) : if lhs_type . mutable : raise NotImplementedError ( 'no default `is` implementation' ) else : try : eq_impl = context . get_function ( '==' , sig ) except NotImplementedError : return cgutils . false_bit else : return eq_impl ( builder , args ) else : return cgutils . false_bit
default implementation for x is y .