class Point: __slots__ = ('x', 'y') def __init__(self, x, y): self.x = x self.y = y p = Point(3, 4) print(f'x: {p.x}') print(f'y: {p.y}')
class Point: __slots__ = ('x', 'y') def __init__(self, x, y): self.x = x self.y = y p = Point(3, 4) print(f'x: {p.x}') print(f'y: {p.y}')