class A:
def __init__(self, x):
print("Calling __init__")
self.x = x
def mynew(cls, *args, **kwargs):
print("Calling mynew")
return object.__new__(cls)
A.__new__ = mynew
A(10)
A.__new__ = lambda cls, x: object.__new__(cls)
a = A(10)
print(a.x)