MCPcopy Create free account
hub / github.com/dabeaz/python-cookbook / Stock

Class Stock

src/8/simplified_initialization_of_data_structures/example3.py:21–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19# Example use
20if __name__ == '__main__':
21 class Stock(Structure):
22 _fields = ['name', 'shares', 'price']
23
24 s1 = Stock('ACME', 50, 91.1)
25 s2 = Stock('ACME', 50, 91.1, date='8/2/2012')

Callers 1

example3.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected