Tagged articles
typing
11 articles · Page 1 of 1
The Python 3.15 beta introduces lazy imports, built‑in frozendict and sentinel types, a low‑overhead sampling profiler, JIT speed gains, unpacking syntax in comprehensions, UTF‑8 as the default encoding, smarter error messages, TypedDict enhancements, and a rollback of incremental GC, each backed by concrete examples and practical guidance for immediate adoption.
JITPythonPython 3.15
0 likes · 15 min read

This article uncovers five lesser‑known Python features—contextlib.suppress, sys.setrecursionlimit, typing.Literal, the __missing__ magic method, and __subclasshook—explaining when to use them, showing concise code examples, and highlighting the practical benefits they bring to everyday programming.
Advanced FeaturesPythoncode optimization
0 likes · 7 min read

This article explains the differences between Python's typing Protocols and Abstract Base Classes, shows practical code examples, and provides guidelines on when to use each approach to achieve flexible, type‑safe, and maintainable software design.
Abstract Base Classesprotocolssoftware architecture
0 likes · 11 min read

Python 3.13 introduces a suite of typing enhancements—including a ReadOnly type for TypedDict, a @warnings.deprecated decorator, the TypeIs construct, is_protocol and get_protocol_members utilities, default TypeVar support with has_default(), the NoDefault sentinel, and several performance and API clean‑ups—providing developers with more expressive and efficient static type checking capabilities.
DeprecatedPython 3.13TypeVar
0 likes · 8 min read

Python 3.13 introduces several typing enhancements—including a ReadOnly type for TypedDict, a @warnings.deprecated decorator, the TypeIs narrowing helper, is_protocol and get_protocol_members utilities, default type support for TypeVar/ParamSpec/TypeVarTuple, the NoDefault sentinel, and notable performance gains by removing legacy typing namespaces.
DeprecatedPython3.13TypeIs
0 likes · 8 min read

Python 3.13 adds seven new typing enhancements—including ReadOnly TypedDict fields, a @warnings.deprecated decorator, TypeIs for type narrowing, is_protocol and get_protocol_members utilities, default TypeVar support, the NoDefault sentinel, and import‑time optimizations—each illustrated with code examples.
Python 3.13TypeVarreadOnly
0 likes · 7 min read

This article explains how Python's dataclasses module, combined with the typing library, can automatically generate boilerplate methods, provide rich type annotations, support optional and union types, enable dictionary serialization, perform runtime checks, and be extended with field metadata for robust, maintainable code.
Code ExamplesPythondataclasses
0 likes · 6 min read

This article introduces nine powerful Python standard library modules that enhance code efficiency and readability, covering context management, iterators, concurrency, file operations, functional programming, AST parsing, type hints, data classes, and async programming.
ASTPythonasyncio
0 likes · 4 min read

Python 3.11 has been officially released, introducing a range of new language features such as fine‑grained error locations, exception groups, built‑in TOML parsing, asyncio task groups, enhanced regular expressions, significant performance gains, and numerous typing improvements like Self types and variadic generics.
Pythonlanguage featuresprogramming
0 likes · 2 min read

This tutorial shares three handy tools—a Sublime Text build system for running Python scripts, an iTerm2 imgcat setup for displaying images directly in the terminal, and a concise guide to Python's typing module for better type safety and code readability.
PythonSublime TextiTerm2
0 likes · 7 min read

This article introduces three handy tools—a Sublime Text build system for running Python scripts, an iTerm2 imgcat utility for displaying images directly in the terminal, and a concise guide to Python's typing module with practical code examples.
Sublime Textcode-snippetsdevelopment-tools
0 likes · 7 min read
