I want print information about my Object when I use print function!
if I do print( my_product ) it displays Product(name = the_name).
My Class:
class Product:
def __init__(self, name = ""):
self._name = name
@property
def name(self):
return self._name
e.g.:
my_product = Product("Computer")
print(my_product)
#Product(name=Computer)
Can you help me please ?