...

/

What is Accessible Where?

What is Accessible Where?

Learn about the accessibility of class members in Python.

Derived class members can access base class members, but not vice versa.

There are no keywords in Python to control access of base class members from the derived class or from outside the class hierarchy.

Instead, a convention that suggests the desired access is used while creating variable names or method names. This convention is:

  • The var variable can be accessed from anywhere in the program.
...