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

Method __init__

Solutions/6_7/stock.py:8–11  ·  view source on GitHub ↗
(self,name, shares, price)

Source from the content-addressed store, hash-verified

6 '''
7 __slots__ = ('name','_shares','price')
8 def __init__(self,name, shares, price):
9 self.name = name
10 self.shares = shares
11 self.price = price
12
13 def __repr__(self):
14 return f'Stock({self.name!r}, {self.shares!r}, {self.price!r})'

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected