Skip to main content

Posts

Featured

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...

Latest posts

An afternoon tea with Unit Testing

Electron Framework For Creating GUI Based Desktop Applications

Debugging Angular App in Visual Studio Code

Angular From System Setup To First Baby Step

Demystifying The Myths About Angular

Loops and Life

O-Data Rest API in .NET with Entity Framework and AutoFac