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

Method __init__

Solutions/7_2/validate.py:151–154  ·  view source on GitHub ↗
(self, name, shares, price)

Source from the content-addressed store, hash-verified

149 shares = PositiveInteger()
150 price = PositiveFloat()
151 def __init__(self, name, shares, price):
152 self.name = name
153 self.shares = shares
154 self.price = price
155
156 def __repr__(self):
157 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