Guest_imported
New member
- Jan 1, 1970
- 0
Hello,
I want to make an attribute of a class protected but I don't know how.
If I try...
class example:
def __init__(self):
self.__attrubute = ""
...self.__attribute is private an child classes cannot use the attribute.
So is it possible in python to declair a protected attribute?
I want to make an attribute of a class protected but I don't know how.
If I try...
class example:
def __init__(self):
self.__attrubute = ""
...self.__attribute is private an child classes cannot use the attribute.
So is it possible in python to declair a protected attribute?