<s> """<STR_LIT>""" <EOL> from ib . lib . overloading import overloaded <EOL> from ib . lib import Cloneable <EOL> from ib . ext . Util import Util <EOL> class Contract ( Cloneable ) : <EOL> """<STR_LIT>""" <EOL> m_conId = <NUM_LIT:0> <EOL> m_symbol = "<STR_LIT>" <EOL> m_secType = "<STR_LIT>" <EOL> m_expiry = "<STR_LIT>" <EOL> m_strike = float ( ) <EOL> m_right = "<STR_LIT>" <EOL> m_multiplier = "<STR_LIT>" <EOL> m_exchange = "<STR_LIT>" <EOL> m_currency = "<STR_LIT>" <EOL> m_localSymbol = "<STR_LIT>" <EOL> m_primaryExch = "<STR_LIT>" <EOL> m_includeExpired = bool ( ) <EOL> m_secIdType = "<STR_LIT>" <EOL> m_secId = "<STR_LIT>" <EOL> m_comboLegsDescrip = "<STR_LIT>" <EOL> m_comboLegs = [ ] <EOL> m_underComp = None <EOL> @ overloaded <EOL> def __init__ ( self ) : <EOL> """<STR_LIT>""" <EOL> super ( Contract , self ) . __init__ ( ) <EOL> self . m_conId = <NUM_LIT:0> <EOL> self . m_strike = <NUM_LIT:0> <EOL> self . m_includeExpired = False <EOL> def clone ( self ) : <EOL> """<STR_LIT>""" <EOL> retval = super ( Contract , self ) . clone ( ) <EOL> retval . m_comboLegs = self . m_comboLegs [ : ] <EOL> return retval <EOL> @ __init__ . register ( object , int , str , str , str , float , str , str , str , str , str , list , str , bool , str , str ) <EOL> def __init___0 ( self , p_conId , p_symbol , p_secType , p_expiry , p_strike , p_right , p_multiplier , p_exchange , p_currency , p_localSymbol , p_comboLegs , p_primaryExch , p_includeExpired , p_secIdType , p_secId ) : <EOL> """<STR_LIT>""" <EOL> super ( Contract , self ) . __init__ ( ) <EOL> self . m_conId = p_conId <EOL> self . m_symbol = p_symbol <EOL> self . m_secType = p_secType <EOL> self . m_expiry = p_expiry <EOL> self . m_strike = p_strike <EOL> self . m_right = p_right <EOL> self . m_multiplier = p_multiplier <EOL> self . m_exchange = p_exchange <EOL> self . m_currency = p_currency <EOL> self . m_includeExpired = p_includeExpired <EOL> self . m_localSymbol = p_localSymbol <EOL> self . m_comboLegs = p_comboLegs <EOL> self . m_primaryExch = p_primaryExch <EOL> self . m_secIdType = p_secIdType <EOL> self . m_secId = p_secId <EOL> def __eq__ ( self , p_other ) : <EOL> """<STR_LIT>""" <EOL> if self is p_other : <EOL> return True <EOL> if p_other is None or not ( isinstance ( p_other , ( Contract , ) ) ) : <EOL> return False <EOL> l_theOther = p_other <EOL> if self . m_conId != l_theOther . m_conId : <EOL> return False <EOL> if Util . StringCompare ( self . m_secType , l_theOther . m_secType ) != <NUM_LIT:0> : <EOL> return False <EOL> if ( Util . StringCompare ( self . m_symbol , l_theOther . m_symbol ) != <NUM_LIT:0> ) or ( Util . StringCompare ( self . m_exchange , l_theOther . m_exchange ) != <NUM_LIT:0> ) or ( Util . StringCompare ( self . m_primaryExch , l_theOther . m_primaryExch ) != <NUM_LIT:0> ) or ( Util . StringCompare ( self . m_currency , l_theOther . m_currency ) != <NUM_LIT:0> ) : <EOL> return False <EOL> if not Util . NormalizeString ( self . m_secType ) == "<STR_LIT>" : <EOL> if self . m_strike != l_theOther . m_strike : <EOL> return False <EOL> if ( Util . StringCompare ( self . m_expiry , l_theOther . m_expiry ) != <NUM_LIT:0> ) or ( Util . StringCompare ( self . m_right , l_theOther . m_right ) != <NUM_LIT:0> ) or ( Util . StringCompare ( self . m_multiplier , l_theOther . m_multiplier ) != <NUM_LIT:0> ) or ( Util . StringCompare ( self . m_localSymbol , l_theOther . m_localSymbol ) != <NUM_LIT:0> ) : <EOL> return False <EOL> if Util . StringCompare ( self . m_secIdType , l_theOther . m_secIdType ) != <NUM_LIT:0> : <EOL> return False <EOL> if Util . StringCompare ( self . m_secId , l_theOther . m_secId ) != <NUM_LIT:0> : <EOL> return False <EOL> if not Util . VectorEqualsUnordered ( self . m_comboLegs , l_theOther . m_comboLegs ) : <EOL> return False <EOL> if self . m_underComp != l_theOther . m_underComp : <EOL> if self . m_underComp is None or l_theOther . m_underComp is None : <EOL> return False <EOL> if not self . m_underComp == l_theOther . m_underComp : <EOL> return False <EOL> return True </s>
