Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz-course/python-mastery
/ sell
Method
sell
Solutions/3_1/stock.py:12–13 ·
view source on GitHub ↗
(self, nshares)
Source
from the content-addressed store, hash-verified
10
return
self.shares * self.price
11
12
def
sell(self, nshares):
13
self.shares -= nshares
14
15
def
read_portfolio(filename):
16
''
&
#x27;
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected