In one file I define a class and a private function. I want to call this function within a method. What is the syntax to reference the "outerscope" of the class and tell python where my function lives? (:
Actual example that do not work:
def __private_function():
pass
class MyClass:
def my_method(self):
__private_function()
Error: NameError: name '_MyClass__private_function' is not defined
Nb:
Similar but not a duplicate of Calling private function within the same class python.