Tagged articles
7 articles
Page 1 of 1
Code Mala Tang
Code Mala Tang
Aug 31, 2025 · Fundamentals

Unlock Python’s Special Classes: Iterators, Context Managers, Descriptors & Metaclasses

This guide explores five special Python class types—iterators, context managers, descriptors, abstract base classes, and metaclasses—explaining their protocols, essential magic methods, practical use cases, and providing clear code examples to help you build custom implementations and write more expressive, maintainable code.

Abstract Base ClassesIteratorsPython
0 likes · 14 min read
Unlock Python’s Special Classes: Iterators, Context Managers, Descriptors & Metaclasses
Test Development Learning Exchange
Test Development Learning Exchange
Jan 23, 2025 · Fundamentals

Advanced Python Features: Generators, Context Managers, Metaclasses, and More

This article introduces twelve advanced Python features—including generators, context managers, metaclasses, descriptors, coroutines, data classes, type annotations, multiple inheritance with mixins, exception chaining, modules and packages, itertools, and regular expressions—explaining their purpose and providing clear code examples to illustrate each concept.

Advanced FeaturesCoroutinesData Classes
0 likes · 8 min read
Advanced Python Features: Generators, Context Managers, Metaclasses, and More
Python Programming Learning Circle
Python Programming Learning Circle
Apr 26, 2023 · Fundamentals

Advanced Python Features You May Not Know

This article introduces a collection of lesser‑known but useful Python standard‑library features—including string cleaning, iterator slicing, skipping iterable headers, keyword‑only functions, context‑manager creation, __slots__ memory savings, resource limits, import control, and simplified comparison operators—explaining their usage and benefits for everyday programming.

Advanced FeaturesIteratorscontext managers
0 likes · 8 min read
Advanced Python Features You May Not Know
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
Python Programming Learning Circle
Python Programming Learning Circle
Apr 19, 2021 · Fundamentals

Understanding Python Magic (Dunder) Methods

This article explains Python's built‑in magic (dunder) methods—functions that start and end with double underscores—showing how they enable custom class behavior such as indexing, iteration, string representation, callable objects, context management, object creation, and attribute handling with clear code examples.

Callable ObjectsIteratorsPython
0 likes · 14 min read
Understanding Python Magic (Dunder) Methods
MaGe Linux Operations
MaGe Linux Operations
Jan 8, 2019 · Fundamentals

Turn Your Code Into Clean, Pythonic Idioms: A Practical Guide

This article walks through what makes code Pythonic, offering clear examples and better alternatives for loops, collections, dictionaries, unpacking, context managers, decorators, and other common patterns to help developers write more readable, efficient, and idiomatic Python.

Code Optimizationbest practicescontext managers
0 likes · 16 min read
Turn Your Code Into Clean, Pythonic Idioms: A Practical Guide
MaGe Linux Operations
MaGe Linux Operations
Feb 2, 2018 · Fundamentals

Master Pythonic Loops: Elegant Techniques for Cleaner Code

The article presents Raymond Hettinger's PyCon 2013 notes on writing Pythonic code, covering loops, collections, dictionary handling, performance tips, context managers, and best practices, with examples and improved alternatives to help developers write clear, efficient, and idiomatic Python.

CollectionsLoopsPython
0 likes · 15 min read
Master Pythonic Loops: Elegant Techniques for Cleaner Code