--- id: namedlist version: "1.8" license: Apache License Version 2.0 license_treatment: permissive maintenance: abandoned --- # namedlist — Similar to namedtuple, but instances are mutable. License: permissive · Maintenance: abandoned · Downloads: 120.8K/mo ## What it is and what it does namedlist provides two factory functions—namedlist and namedtuple—that generate named tuple-like classes with enhanced default-value handling. The key difference from collections.namedtuple is that namedlist instances are mutable (you can reassign fields after creation), while namedtuple instances remain immutable. Both support per-field defaults, a global default value applied to all fields without explicit defaults, and factory functions for mutable defaults like lists. The package is no longer maintained and its own documentation warns users to prefer built-in dataclasses instead. It has no runtime dependencies and installs as a pure Python wheel. It was last released 2020-08-30 and has not been updated since, so it should be considered legacy code suitable only for maintaining existing projects. Use it for: - Maintaining code that already depends on namedlist for mutable named tuple behavior. - Creating lightweight mutable data structures with named fields and sensible defaults. - Defining immutable records with per-field defaults when per-field default support is needed. - Building tuple-like objects that support attribute access, iteration, and selective field updates. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Creates mutable or immutable named tuple-like classes with support for per-field and global default values. No, unless maintaining legacy code. The package is abandoned and explicitly recommends using built-in dataclasses instead. For new projects, dataclasses provide superior maintainability and ongoing language support. Install only to maintain or understand existing code that already depends on namedlist. ## Install pip install namedlist uv add namedlist poetry add namedlist ## Installing namedlist Before you install: Installation is frictionless (pure Python wheel, no dependencies), but the package is abandoned as of 2020-08-30 and explicitly recommends using built-in dataclasses instead. License in practice: Licensed under Apache License Version 2.0 (permissive), allowing commercial and private use with minimal restrictions. Quickstart: from namedlist import namedlist Point = namedlist('Point', 'x y') p = Point(1, 3) p.x = 2 assert p.x == 2 Verify before relying: - Whether dataclasses truly supersedes all namedlist use cases or if mutable behavior remains distinct. - Current compatibility with Python versions beyond 3.8 (last tested version in classifiers). - Whether the package works correctly with modern Python despite no maintenance since 2020-08-30. ## Package facts - License: Apache License Version 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 120.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags mutable namedtuple, named tuple with defaults, mutable data structure, field defaults, tuple-like class generator, immutable named records, factory function defaults, legacy, data-structures [View on SkillFed](https://skillfed.io/packages/namedlist) · [View on PyPI](https://pypi.org/project/namedlist/)