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

Method __init__

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

Source from the content-addressed store, hash-verified

61print("Example 2")
62class Point2D(Serializable):
63 def __init__(self, x, y):
64 super().__init__(x, y)
65 self.x = x
66 self.y = y
67
68 def __repr__(self):
69 return f"Point2D({self.x}, {self.y})"

Callers 5

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected