Is it possible to call parent class-private methods from child class in Python?

I’m trying to call __search from parent class A in child class B but I get the error: AttributeError: ‘B’ object has no attribute ‘_B__search’ This seems to be only happening for methods starting with __. Is there a way to call these class-private methods when doing inheritance? class A: def __init__(self, a): self.a =… Read More Is it possible to call parent class-private methods from child class in Python?