I ran the code below, by calling the function in the constructor
First --
>>> class PrintName: ... def __init__(self, value): ... self.
Instead of
printName(self._value)
you wanted
self.printName(self._value)
It probably worked the first time because you had another function printName in a parent scope.
printName