When I run your code I get the following exception:
TypeError: __init__() takes exactly 3 arguments (1 given)
You have to pass x
and y
arguments to the constructor or define default values:
Arguments to the constructor:
object1 = a("name", "family")
Default values:
class a(object):
def __init__(self, x="", y=""):
...
12
solved What is the issue with this Python code? [duplicate]