Tagged articles
3 articles
Page 1 of 1
Python Programming Learning Circle
Python Programming Learning Circle
Oct 30, 2021 · Fundamentals

Lesser‑Known Python Standard Library Features and Techniques

This article explores several lesser‑known Python standard‑library techniques—including string sanitization, iterator slicing with itertools.islice, skipping initial lines, enforcing keyword‑only arguments, creating custom context managers, using __slots__ for memory savings, limiting CPU/memory via the resource module, controlling module exports with __all__, and simplifying comparisons with functools.total_ordering.

IteratorsMemory Managementcontext managers
0 likes · 7 min read
Lesser‑Known Python Standard Library Features and Techniques
MaGe Linux Operations
MaGe Linux Operations
Aug 30, 2020 · Fundamentals

Unlock Hidden Python Tricks: From String Cleanup to Memory Limits

Explore a collection of lesser‑known Python tricks—including string sanitization, iterator slicing, context‑manager shortcuts, memory‑saving slots, resource limits, controlled imports, and simplified ordering—each illustrated with concise code examples to help you write cleaner, more efficient programs.

IteratorMemory OptimizationString Manipulation
0 likes · 10 min read
Unlock Hidden Python Tricks: From String Cleanup to Memory Limits
MaGe Linux Operations
MaGe Linux Operations
Mar 2, 2019 · Fundamentals

Master Python’s functools: Decorators, partial, caching, and more

This article explores Python’s functools module, demonstrating how to create and use decorators, partial functions, update_wrapper, total_ordering, cmp_to_key, lru_cache, reduce, and singledispatch, with clear code examples that illustrate each utility and its practical applications.

Pythoncachingdecorators
0 likes · 19 min read
Master Python’s functools: Decorators, partial, caching, and more