MCPcopy Create free account
hub / github.com/dabeaz-course/practical-python / __init__

Method __init__

Work/Data/stocksim.py:56–68  ·  view source on GitHub ↗
(self,name)

Source from the content-addressed store, hash-verified

54
55class StockTrack(object):
56 def __init__(self,name):
57 self.name = name
58 self.history = []
59 self.price = 0
60 self.time = 0
61 self.index = 0
62 self.open = 0
63 self.low = 0
64 self.high = 0
65 self.volume = 0
66 self.initial = 0
67 self.change = 0
68 self.date = ""
69 def add_data(self,record):
70 self.history.append(record)
71 def reset(self,time):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected