Tag

__dict__

1 views collected around this technical thread.

Code Mala Tang
Code Mala Tang
Apr 29, 2025 · Fundamentals

Unlock Python’s Hidden Power: Mastering the __dict__ Attribute

Explore how Python’s built-in __dict__ attribute stores object attributes, enabling introspection, dynamic attribute manipulation, memoization, JSON serialization, custom descriptors, and debugging, while also learning its limitations with slots and built-in types for performance.

PythonSerialization__dict__
0 likes · 8 min read
Unlock Python’s Hidden Power: Mastering the __dict__ Attribute
Test Development Learning Exchange
Test Development Learning Exchange
Sep 16, 2024 · Fundamentals

Python dict, set, and frozenset: Common Methods, Subclassing, and Implementation Principles

This article explains Python's dict, set, and frozenset containers, lists their most frequently used methods, demonstrates how to subclass dict and create a container class, and describes the hash‑table implementation details that give these data structures their high performance.

Data StructuresPython__dict__
0 likes · 12 min read
Python dict, set, and frozenset: Common Methods, Subclassing, and Implementation Principles
Python Programming Learning Circle
Python Programming Learning Circle
Jul 21, 2021 · Fundamentals

Understanding Python's __dict__ System, Properties, and Dynamic Attribute Generation

This article explains Python's __dict__ attribute storage, class and instance attributes, demonstrates how to inspect and modify them, introduces properties using the built‑in property() function, and shows dynamic attribute generation with __getattr__, providing clear code examples and explanations.

Python__dict__attributes
0 likes · 9 min read
Understanding Python's __dict__ System, Properties, and Dynamic Attribute Generation
Test Development Learning Exchange
Test Development Learning Exchange
Jul 15, 2018 · Fundamentals

Using Python dict() to Create and Manipulate Dictionaries

This article explains how the Python dict() function creates new dictionaries, demonstrates various ways to supply key/value pairs—including empty dictionaries, literal mappings, keyword arguments, lists of tuples, and zip()—and provides examples of common dictionary methods such as clear, copy, fromkeys, get, items, keys, pop, popitem, setdefault, and update.

Tutorial__dict__code examples
0 likes · 5 min read
Using Python dict() to Create and Manipulate Dictionaries