I ran the code below, by calling the function in the constructor
First --
>>> class PrintName: ... def __init__(self, value): ... self.
What you want is self.printName(self._value) in __init__, not just printName(self._value).
self.printName(self._value)
__init__
printName(self._value)