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

Method sell

Solutions/4_4/stock.py:18–22  ·  view source on GitHub ↗

Sell a number of shares

(self, nshares)

Source from the content-addressed store, hash-verified

16 return self.shares * self.price
17
18 def sell(self, nshares):
19 '''
20 Sell a number of shares
21 '''
22 self.shares -= nshares
23

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected