Author name: Nilin Rose

Understanding Python’s Descriptor Protocol

Database fields rely on Python’s Descriptor Protocol to manage data, and built-in properties like @property and staticmethod use it to control attribute access. Descriptors allow developers to define custom behavior for attributes, ensuring better control over how values are stored, retrieved, and modified. What are Descriptors? A descriptor is a Python object that controls attribute …

Understanding Python’s Descriptor Protocol Read More »

How to Use Python’s dataclass for Cleaner and Faster Code

Are writing classes in Python sometimes too much work? You have to usually define an  _init_ method, or  _repr_ or _eq_method, and suddenly your class is filled with code! Well, guess what? Python’s dataclass is here to save the day! While using something called a decorator, you get automatic methods for initialization, representation, and comparison. …

How to Use Python’s dataclass for Cleaner and Faster Code Read More »

Writing Memory-Efficient Python Code Using Generators & Itertools

Have you ever wanted to go through your data without going through the tedious statements? Then you my friend are in luck with this article, welcome to your one time stop for writing memory efficient code! In this tutorial we will learn about itertools and generators. ITERTOOLS What is Itertool now you may ask? Itertool, …

Writing Memory-Efficient Python Code Using Generators & Itertools Read More »

Scroll to Top