'generated source for method equals'

def __eq__(self, p_other):

    if (self is p_other):
        return True
    if ((p_other is None) or (not isinstance(p_other, (Contract,)))):
        return False
    l_theOther = p_other
    if (self.m_conId != l_theOther.m_conId):
        return False
    if (Util.StringCompare(self.m_secType, l_theOther.m_secType) != 0):
        return False
    if ((Util.StringCompare(self.m_symbol, l_theOther.m_symbol) != 0) or (Util.StringCompare(self.m_exchange, l_theOther.m_exchange) != 0) or (Util.StringCompare(self.m_primaryExch, l_theOther.m_primaryExch) != 0) or (Util.StringCompare(self.m_currency, l_theOther.m_currency) != 0)):
        return False
    if (not (Util.NormalizeString(self.m_secType) == 'BOND')):
        if (self.m_strike != l_theOther.m_strike):
            return False
        if ((Util.StringCompare(self.m_expiry, l_theOther.m_expiry) != 0) or (Util.StringCompare(self.m_right, l_theOther.m_right) != 0) or (Util.StringCompare(self.m_multiplier, l_theOther.m_multiplier) != 0) or (Util.StringCompare(self.m_localSymbol, l_theOther.m_localSymbol) != 0) or (Util.StringCompare(self.m_tradingClass, l_theOther.m_tradingClass) != 0)):
            return False
    if (Util.StringCompare(self.m_secIdType, l_theOther.m_secIdType) != 0):
        return False
    if (Util.StringCompare(self.m_secId, l_theOther.m_secId) != 0):
        return False
    if (not Util.VectorEqualsUnordered(self.m_comboLegs, l_theOther.m_comboLegs)):
        return False
    if (self.m_underComp != l_theOther.m_underComp):
        if ((self.m_underComp is None) or (l_theOther.m_underComp is None)):
            return False
        if (not (self.m_underComp == l_theOther.m_underComp)):
            return False
    return True
