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

Method sell

Solutions/4_10/stock.py:21–25  ·  view source on GitHub ↗

Sell a number of shares

(self, nshares)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected