Tagged articles
8 articles
Page 1 of 1
DeepHub IMBA
DeepHub IMBA
Mar 10, 2026 · Fundamentals

7 Hidden Python Stdlib Tools That Simplify Your Code

The article presents seven powerful Python standard‑library features—generators for lazy evaluation, defaultdict for concise counting, pathlib for robust path handling, functools.partial for quick function specialization, itertools for flattening nested loops, type for dynamic class creation, and decorators for reusable logic—showing how each reduces memory usage, simplifies code, and improves automation.

GeneratorsPythonStandard Library
0 likes · 7 min read
7 Hidden Python Stdlib Tools That Simplify Your Code
IT Services Circle
IT Services Circle
Oct 7, 2025 · Fundamentals

Unlock Python Dictionaries with __missing__: Transform Missing Keys into Smart Logic

This article explores Python's __missing__ dunder method, showing how it surpasses traditional approaches like if/else, .get() and defaultdict by enabling dynamic, self‑healing dictionary behavior, and demonstrates advanced real‑world applications such as smart counters, infinite nested dicts, API caching, and automatic data pipelines.

API cachePython__missing__
0 likes · 13 min read
Unlock Python Dictionaries with __missing__: Transform Missing Keys into Smart Logic
Test Development Learning Exchange
Test Development Learning Exchange
Jun 26, 2024 · Fundamentals

Python collections module: Counter, defaultdict, deque, namedtuple, ChainMap, custom containers, heapq, and LRU cache examples

This article introduces several useful classes from Python's collections module—including Counter, defaultdict, deque, namedtuple, ChainMap, UserList/UserDict/UserString, as well as heapq and an OrderedDict‑based LRU cache—explaining their purposes and providing ready‑to‑run code examples for each.

ChainMapCollectionsCounter
0 likes · 6 min read
Python collections module: Counter, defaultdict, deque, namedtuple, ChainMap, custom containers, heapq, and LRU cache examples
Python Programming Learning Circle
Python Programming Learning Circle
Mar 3, 2022 · Fundamentals

Advanced Python Dictionary and Set Techniques

This article introduces several high‑level Python dictionary and set methods—including fromkeys, merge, setdefault, defaultdict, OrderedDict, as well as set comprehensions and custom hashing—to simplify code, improve readability, and demonstrate practical usage patterns with clear examples.

AdvancedOrderedDictSet
0 likes · 11 min read
Advanced Python Dictionary and Set Techniques
MaGe Linux Operations
MaGe Linux Operations
Jan 29, 2022 · Fundamentals

Master Python’s Powerful Containers: Counter, defaultdict, OrderedDict, deque & ChainMap

This article introduces Python’s collections module as a versatile alternative to built‑in containers, detailing the purpose, key methods, and practical code examples for Counter, defaultdict, OrderedDict, namedtuple, deque, and ChainMap, helping developers choose the right specialized container for their tasks.

ChainMapCollectionsCounter
0 likes · 11 min read
Master Python’s Powerful Containers: Counter, defaultdict, OrderedDict, deque & ChainMap