def abstract_equality_op(self, other):
tx, ty = Type(self), Type(other)<EOL>if tx == ty:<EOL><INDENT>if tx == '<STR_LIT>' or tx == '<STR_LIT>':<EOL><INDENT>return True<EOL><DEDENT>if tx == '<STR_LIT>' or tx == '<STR_LIT>' or tx == '<STR_LIT>':<EOL><INDENT>return self == other<EOL><DEDENT>return self is other  <EOL><DEDENT>elif (tx == '<STR_LIT>' and ty == '<STR_LIT>') or (ty == '<STR_LIT>'<EOL>and tx == '<STR_LIT>'):<EOL><INDENT>return True<EOL><DEDENT>elif tx == '<STR_LIT>' and ty == '<STR_LIT>':<EOL><INDENT>return abstract_equality_op(self, to_number(other))<EOL><DEDENT>elif tx == '<STR_LIT>' and ty == '<STR_LIT>':<EOL><INDENT>return abstract_equality_op(to_number(self), other)<EOL><DEDENT>elif tx == '<STR_LIT>':<EOL><INDENT>return abstract_equality_op(to_number(self), other)<EOL><DEDENT>elif ty == '<STR_LIT>':<EOL><INDENT>return abstract_equality_op(self, to_number(other))<EOL><DEDENT>elif (tx == '<STR_LIT>' or tx == '<STR_LIT>') and is_object(other):<EOL><INDENT>return abstract_equality_op(self, to_primitive(other))<EOL><DEDENT>elif (ty == '<STR_LIT>' or ty == '<STR_LIT>') and is_object(self):<EOL><INDENT>return abstract_equality_op(to_primitive(self), other)<EOL><DEDENT>else:<EOL><INDENT>return False<EOL><DEDENT>
returns the result of JS == compare.
       result is PyJs type: bool