Browse by Topic
Popular
Popular Posts
Latest
Latest Python Posts
Understanding Python Instance __dict__
Learn how Python's instance __dict__ stores attributes, how to inspect and modify it, and when __slots__ offers a better memory tradeoff.
Python Class __dict__: Instance and Class Namespaces
Python's __dict__ namespaces hold instance and class attributes. Learn how attribute lookup uses them and when __slots__ removes the instance dictionary.
Python dict: Dictionary Operations and Performance
A practical guide to Python dict: creation, access, merging, iteration, comprehension, and hash-table performance behavior.
Python Object Namespace: How Attribute Lookup Works
Understand how Python object namespaces work: instance __dict__, class attribute lookup, __slots__, and programmatic namespace manipulation.
Python Class Namespace: How Attribute Lookup Works
Understand how the Python class namespace works, how attribute lookup resolves names, and how class and instance namespaces differ in real code.
Python Unbound Method: What It Is and How It Changed
An unbound method in Python 2 is the object you get when you access an instance method through the class. Python 3 replaces it with a plain function. See what changed and how to handle the difference.
Python Bound Method: How Instance Methods Work
Understand how Python creates bound methods, why self is passed automatically, and how the descriptor protocol controls method access.
Python Method Binding: How Methods Attach to Objects
Learn how Python binds instance methods to objects, how bound method objects use the descriptor protocol, and where classmethod and staticmethod fit in.
Python classmethod vs staticmethod: Key Differences
Learn how Python's classmethod and staticmethod decorators differ: what each receives when called, how inheritance affects the class argument, and when to use each pattern.
python staticmethod decorator explained
Learn how the python staticmethod decorator works, when to use it, and how it differs from classmethod and instance methods.