class Thing: def __foo(self): print "foo()" def __init__(self): self.__foo() thing = Thing() thing.__foo()
Standard input is empty
foo()
Traceback (most recent call last): File "prog.py", line 9, in <module> AttributeError: Thing instance has no attribute '__foo'