Python Notes - OOPs - Udemy course
Oops: In python there is no such concept of access modifiers(like public,private,protected etc).By default all are variables inside of the class are public, we can add _(under score) prefix infront of name to inform developers it is non public i.e it should be accessed outside of the class.Technically developers can even access that outside of the class. Name mangling is also same when you want to access the variables inside a class. Here we will use 2 underscores before attribute and while calling we need to use(_className__attributeName).Even thecnically this can be used otuside of class but we should not use it. A decorator is a function that takes a function as argument to extend its functionality without actually modifying it. This is the typical syntax of a decorator function: def decorator_function ( arg_function ): def wrapper_function (): # Code to extend the functionality arg_function () # Code to extend the functionality return wrapper_f...