__new__
class Demo:
def __new__(cls, *args):
print("In __new__")
obj = super().__new__(cls)
return obj
def __init__(self, *args):
print("In __init__")
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext
class Demo:
def __new__(cls, *args):
print("In __new__")
obj = super().__new__(cls)
return obj
def __init__(self, *args):
print("In __init__")