Tag

typing

0 views collected around this technical thread.

Python Programming Learning Circle
Python Programming Learning Circle
Apr 18, 2025 · Fundamentals

Protocols vs. Abstract Base Classes in Python: Choosing the Right Tool for Design

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 ClassesPythondesign patterns
0 likes · 11 min read
Protocols vs. Abstract Base Classes in Python: Choosing the Right Tool for Design
Python Programming Learning Circle
Python Programming Learning Circle
Feb 27, 2025 · Fundamentals

Effective Use of Python Type Hints: Basics, Optional, Collections, Unions, and Any

This article explains how to apply Python type hints—including basic types, the modern pipe syntax for optional values, collection generics, union types, and the flexible Any type—through clear examples and best‑practice guidance to make code more readable and safer.

CollectionsOptionalany
0 likes · 6 min read
Effective Use of Python Type Hints: Basics, Optional, Collections, Unions, and Any
Python Programming Learning Circle
Python Programming Learning Circle
Dec 5, 2024 · Fundamentals

New Typing Features in Python 3.13: ReadOnly, @warnings.deprecated, TypeIs, is_protocol, get_protocol_members, Default TypeVars, NoDefault, and Performance Improvements

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.

Python 3.13ReadOnlyTypeVar
0 likes · 8 min read
New Typing Features in Python 3.13: ReadOnly, @warnings.deprecated, TypeIs, is_protocol, get_protocol_members, Default TypeVars, NoDefault, and Performance Improvements
Python Programming Learning Circle
Python Programming Learning Circle
Oct 18, 2024 · Fundamentals

New Typing Features in Python 3.13: ReadOnly, @warnings.deprecated, TypeIs, is_protocol, get_protocol_members, Default Types, NoDefault and Performance Improvements

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.

PythonPython3.13ReadOnly
0 likes · 8 min read
New Typing Features in Python 3.13: ReadOnly, @warnings.deprecated, TypeIs, is_protocol, get_protocol_members, Default Types, NoDefault and Performance Improvements
Python Programming Learning Circle
Python Programming Learning Circle
Oct 16, 2024 · Fundamentals

New Typing Features in Python 3.13: ReadOnly, @warnings.deprecated, TypeIs, is_protocol, get_protocol_members, Default TypeVars, NoDefault and Performance Improvements

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.

PythonPython 3.13ReadOnly
0 likes · 7 min read
New Typing Features in Python 3.13: ReadOnly, @warnings.deprecated, TypeIs, is_protocol, get_protocol_members, Default TypeVars, NoDefault and Performance Improvements
Test Development Learning Exchange
Test Development Learning Exchange
Jul 29, 2024 · Fundamentals

Leveraging Python dataclasses and typing for clean, type‑safe data models

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.

Serializationcode examplesdataclasses
0 likes · 6 min read
Leveraging Python dataclasses and typing for clean, type‑safe data models
Test Development Learning Exchange
Test Development Learning Exchange
Jun 24, 2024 · Fundamentals

Python Standard Library: 9 Essential Modules for Efficient Development

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 Standard Library: 9 Essential Modules for Efficient Development
Laravel Tech Community
Laravel Tech Community
Oct 25, 2022 · Fundamentals

Python 3.11 Stable Release: Major New Features and Changes

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 featuresperformance
0 likes · 2 min read
Python 3.11 Stable Release: Major New Features and Changes