I'm trying to learn python programming and so far so good. However when
trying to master the oop side I ran into a small problem.
I think I've done everything ok as outlined below. But I just don't
understand why the `method' of `class' example isn't printing any of the
variables that I have set earlier on ? Could someone please explain to me
what it is I am doing wrong ?
Thank you so much !
def __init__(self, foo, bar):
self.foo = foo
self.bar = bar
print "method ... :"
if __name__ == "__main__":
obj = example
obj.foo = "var1"
obj.bar = "var2"