MCPcopy Create free account
hub / github.com/dabeaz-course/practical-python / __repr__

Method __repr__

Solutions/6_7/stock.py:13–14  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

11 self.price = price
12
13 def __repr__(self):
14 return f'Stock({self.name!r}, {self.shares!r}, {self.price!r})'
15
16 @property
17 def shares(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected