Python

Properties In Python

Properties in python are used to provide access methods to change an attribute of a class. By providing getter, setter, deleter methods, properties provide abstraction over the internal representation of the data. Property functions can range from data type validation, to any enrichment and calculation. By adding a @property decorator, Read more…

By Naved, ago
Python

Decorators in Python

Decorators or Wrappers (@) in python are used to provide additional characteristic to a function. In other words a decorator wraps a function, modifying its behavior. These are simply other python functions which return functions as return values. Few common usages of decorators are @login_required: To validate if a user Read more…

By Naved, ago