I'm trying to call a method from the parent's class in the child class, but I get an exception.
That's the parent class:
from typing import Dict
class Parent:
__arg: Dict
@property
def arg(self) -> Dict:
return self.__arg
That's the child class:
class Child(Parent):
def __init__(self, title) -> None:
super(Child, self).__init__()
self.__arg: Dict = {
"some": "text",
}
When I'm trying to run Child("Metallica").arg
I get this exception: AttributeError: 'Child' object has no attribute '_Parent__arg'
Can someone help me please :3