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

Method __init__

Solutions/3_2/stock.py:4–7  ·  view source on GitHub ↗
(self, name, shares, price)

Source from the content-addressed store, hash-verified

2
3class Stock:
4 def __init__(self, name, shares, price):
5 self.name = name
6 self.shares = shares
7 self.price = price
8
9 def cost(self):
10 return self.shares * self.price

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected