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

Method incr

Work/Data/stocksim.py:112–117  ·  view source on GitHub ↗
(self,dt)

Source from the content-addressed store, hash-verified

110
111 # Increment the time by a delta
112 def incr(self,dt):
113 self.time += dt
114 if self.index < (len(self.history) - 2):
115 while self.index < (len(self.history) - 2) and self.time >= self.history[self.index+1][3]:
116 self.index += 1
117 self.update()
118
119 def make_record(self):
120 return [self.name,round(self.price,2),self.date,minutes_to_str(self.time),round(self.change,2),self.open,round(self.high,2),

Callers 1

runMethod · 0.80

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected