I was wondering how to achieve this behavior.
When you call a variable in python, it directly displays some value.
like:
>> a= 5
>> a
5
libraries like numpy also do this
>> a = np.array([1,2])
>> a
>> array([1,2])
Happens something like that right? So i want to emulate that behaviour to build a class
class example(object):
def __init__(self,intputs):
self.out = inputs
...
instance = example(inputs)
such that when i write
instance
it were directly equivalent to do
instance.out
Cos the most similar thing I know is setting call to do that but in that case it would be calling instance() with those brackets