MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / printinstance

Function printinstance

packages/ibkr/ref/samples/Python/Testbed/Program.py:158–166  ·  view source on GitHub ↗
(inst:Object)

Source from the content-addressed store, hash-verified

156 return fn2
157
158def printinstance(inst:Object):
159 attrs = vars(inst)
160 print(', '.join('{}:{}'.format(key, decimalMaxString(value) if type(value) is Decimal else
161 floatMaxString(value) if type(value) is float else
162 intMaxString(value) if type(value) is int else
163 getEnumTypeName(FundAssetType, value) if type(value) is FundAssetType else
164 getEnumTypeName(FundDistributionPolicyIndicator, value) if type(value) is FundDistributionPolicyIndicator else
165 "{%s}" % "; ".join(map(str, value)) if type(value) is list else
166 value) for key, value in attrs.items()))
167
168class Activity(Object):
169 def __init__(self, reqMsgId, ansMsgId, ansEndMsgId, reqId):

Callers 2

contractDetailsMethod · 0.85
bondContractDetailsMethod · 0.85

Calls 4

decimalMaxStringFunction · 0.90
getEnumTypeNameFunction · 0.90
floatMaxStringFunction · 0.50
intMaxStringFunction · 0.50

Tested by

no test coverage detected