MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / __init__

Method __init__

example_code/item_063.py:86–89  ·  view source on GitHub ↗
(self, x, y)

Source from the content-addressed store, hash-verified

84print("Example 4")
85class BetterPoint2D(Deserializable):
86 def __init__(self, x, y):
87 super().__init__(x, y)
88 self.x = x
89 self.y = y
90
91 def __repr__(self):
92 return f"Point2D({self.x}, {self.y})"

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected