def __new__(cls, x, y):
    return tuple.__new__(cls, (x, y))

@property
def x(self):
    return tuple.__getitem__(self, 0)

@property
def y(self):
    return tuple.__getitem__(self, 1)

def __getitem__(self, item):
    raise TypeError
How to make an immutable object in Python?