I am working on a project where I need to deal with complex numbers. I am using the predefined class complex in python. But I would like to add some more properties to the predefined implementation.
I tried to inherit the class through a custom class, like this
class C(complex):
def __init__(self,x,y):
complex.__init__(self,x,y)
But it shows the error
TypeError: object.__init__() takes exactly one argument (the instance to initialize)
Can anyone suggest the proper way to inherit from class complex in python? Thanks!!