Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz-course/practical-python
/ __repr__
Method
__repr__
Solutions/8_1/stock.py:18–19 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
16
self.price = price
17
18
def
__repr__(self):
19
return
f
'Stock({self.name!r}, {self.shares!r}, {self.price!r})'
20
21
@property
22
def
cost(self):
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected