Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz-course/python-mastery
/ sell
Method
sell
Solutions/3_5/stock.py:42–43 ·
view source on GitHub ↗
(self, nshares)
Source
from the content-addressed store, hash-verified
40
return
self.shares * self.price
41
42
def
sell(self, nshares):
43
self.shares -= nshares
44
45
# Sample
46
if
__name__ ==
'__main__'
:
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected