In this program the output is not what I would expect:
class example(object):
def __init__(self, foo,bar):
self.foo = foo
self.bar = bar
def what_are_you():
print(foo,bar)
print("This doesn't work either")
a = example("aaa","bbb")
a.what_are_you
#should return "aaa bbb"
print(a.what_are_you)
print(a.foo,a.bar)
Instead it outputs nothing. This is the whole output:
<bound method example.what_are_you of <__main__.example object at 0x000002A9574B4710>>
aaa bbb
Process returned 0 (0x0) execution time : 0.041 s