I have a class called myClass
.
class myClass:
def __init__(self, a, b):
self.a = a
self.b = b
I have a variable which is an instance of myClass
myObject = myClass(5, 3)
How do I have it so that when I call myObject
, it returns a set value instead of <__main__.myClass object at 0x100816580>
.
For example,
>>> myObject
"some value"