class Person:
def int(self, name):
self.name = name
def talk(self):
print('talk')
john = Person(‘John Smith’)
print(john.name)
john.talk()
result below:
Traceback (most recent call last):
File “C:\Users\ADMIN\PycharmProjects\Constructors\app.py”, line 25, in
john = Person(‘John Smith’)
^^^^^^^^^^^^^^^^^^^^
TypeError: Person() takes no arguments
Process finished with exit code 1