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

Method __init__

Solutions/5_2/stock.py:6–9  ·  view source on GitHub ↗
(self, name, shares, price)

Source from the content-addressed store, hash-verified

4 __slots__ = ('name','_shares','_price')
5 _types = (str, int, float)
6 def __init__(self, name, shares, price):
7 self.name = name
8 self.shares = shares
9 self.price = price
10
11 def __repr__(self):
12 # Note: The !r format code produces the repr() string

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected