Protection levels in Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kay Schluehr

    Protection levels in Python

    People often ask for making attributes "private" in the sense of
    restricting access as in Java or C++. I've created a recipe for
    attribute protection where all attributes are basically protected in
    the C++ sense of being visible in the class and in subclasses and where
    "public" attributes have to be declared explicitely:



    Regards,
    Kay

Working...