Behind the Underscores EP10: Context Management (__enter__, __exit__)

PROGRAMMING

May 19, 2025

Learn how Python’s context managers work with __enter__, __exit__, and the with statement. This blog breaks down the concept and teaches you how to write your own context managers to manage resources like files, network connections, and more.

Behind the Underscores EP09: Attribute Access (__getattr__ __getattribute__ __setattr__ __delattr__)

PROGRAMMING

May 19, 2025

This blog explores Python's special attribute access methods: __getattr__, __getattribute__, __setattr__, and __delattr__. Learn how to control and customize attribute behavior in your classes with examples.

Behind the Underscores EP08: Length and iteration Methods (__len__ __iter__ __next__ __contains__)

PROGRAMMING

May 16, 2025

Learn how to make your custom Python classes behave like built-in types using special methods like __len__, __iter__, __next__, and __contains__. This blog breaks down each method with real-world examples and practical tips for writing clean code.

Behind the Underscores EP07: Container protocol (__getitem__, __setitem__, __delitem__)

PROGRAMMING

May 16, 2025

In this blog, we explore Python’s container protocol methods, __getitem__, __setitem__, and __delitem__ . You’ll learn how to customize object behavior just like dictionaries or lists.

Behind the Underscores EP06: Bitwise Methods (__and__, __or__, __xor__)

PROGRAMMING

May 15, 2025

A deep dive into Python’s bitwise magic methods like __and__, __or__, and __xor__. Great for advanced learners who want to write smarter, cleaner code with custom objects and operators.