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