Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz-course/python-mastery
/ sell
Method
sell
Solutions/6_3/stock.py:13–14 ·
view source on GitHub ↗
(self, nshares)
Source
from the content-addressed store, hash-verified
11
return
self.shares * self.price
12
13
def
sell(self, nshares):
14
self.shares -= nshares
15
16
Stock.set_fields()
17
Callers
1
test_sell
Method · 0.95
Calls
no outgoing calls
Tested by
1
test_sell
Method · 0.76