Python and Private Class Members
It's Private or is it really ? 😒 (Image Credit: Annie Spratt from Unsplash ) Python is a great language and one can easily pick it up and make wonders using it. It's easy and quite lucid to understand. Though many have the opinion that it is a functional language while others convicted it as an object-oriented language. Personally, I think it's a blend of both worlds. So, well as the heading of this blog suggests, we are going to explore python and private access modifiers. As most of us know that private access specifiers restrict members(attributes and methods) from being seen or accessed outside of their own region (class). Consider the normal NameCollector class which collects the name in name_collection list. This is a typical example where you can see that the name_collection can be accessed or modified outside of the class pretty easily. With a little trick of adding dunder(double underscore __) in the prefix of name_collection (__name_collection) , p...


