{"slug": "pyrsistent", "name": "pyrsistent", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 3, "commenters": 3, "warners": 0, "score": 2.444, "rising": -0.98, "first": "2025-12-11", "latest": "2025-12-11", "why": "If you want real immutable data structures, not a cheap imitation, check out pyrsistent.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 3, "neutral": 0, "compare": 0, "warn": 0}, "spark": [0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "If you want real immutable data structures, not a cheap imitation, check out pyrsistent.", "kind": "", "icon": false, "domain": null, "github_repo": "github.com/tobgu/pyrsistent", "official_url": "https://github.com/tobgu/pyrsistent", "pricing": "", "aliases": ["pyrsistent"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 739715664, "item_id": 46232229, "url": "https://news.ycombinator.com/item?id=46232229", "by": "perrygeo", "date": "2025-12-11", "stance": "recommend", "quote": "If you want real immutable data structures, not a cheap imitation, check out pyrsistent.", "excerpt": "Python discovers immutable data, and gets it wrong. Frozendict is a blunt instrument - instead of a mutable free-for-all, it just locks the data for the entire lifecycle. Brace for the wave of code littered with deep copies, proudly proclaiming how functional it all is. If you want real immutable data structures, not a cheap imitation, check out pyrsistent.", "context": "", "use_case": "immutable data structures", "switched_from": "", "story": "A \u201cfrozen\u201d dictionary for Python"}, {"id": 739714848, "item_id": 46232178, "url": "https://news.ycombinator.com/item?id=46232178", "by": "clickety_clack", "date": "2025-12-11", "stance": "recommend", "quote": "Maybe you should take a look at pyrsistent.", "excerpt": "Maybe you should take a look at pyrsistent. That allows you to make frozen \u201cmaps\u201d. You can \u201cevolve\u201d them into new versions of the objects and it keeps the references to the unchanged keys and values under the hood so it\u2019s fast and memory efficient.", "context": "", "use_case": "frozen dict-like maps", "switched_from": "", "story": "A \u201cfrozen\u201d dictionary for Python"}, {"id": 739680512, "item_id": 46230032, "url": "https://news.ycombinator.com/item?id=46230032", "by": "code_biologist", "date": "2025-12-11", "stance": "recommend", "quote": "a personal favorite library for frozen/immutable/hashable data structures", "excerpt": "Shoutout to pyrsistent, a personal favorite library for frozen/immutable/hashable data structures whenever I need to use lists, sets, or dicts as dict keys, or make sets of such items: https://github.com/tobgu/pyrsistent", "context": "", "use_case": "immutable data structures", "switched_from": "", "story": "A \u201cfrozen\u201d dictionary for Python"}]}], "caveats": [], "who": [], "tags": [], "use_cases": ["immutable data structures", "frozen dict-like maps"], "compared": [], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=46229467", "title": "A \u201cfrozen\u201d dictionary for Python", "mentions": 3}], "sentiment_by_month": {"2025-11": {}, "2025-12": {"recommend": 3}, "2026-01": {}, "2026-02": {}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {}, "2026-07": {}, "2026-08": {}, "2026-09": {}, "2026-10": {}}, "quotes": [{"id": 739715664, "item_id": 46232229, "url": "https://news.ycombinator.com/item?id=46232229", "by": "perrygeo", "date": "2025-12-11", "stance": "recommend", "quote": "If you want real immutable data structures, not a cheap imitation, check out pyrsistent.", "excerpt": "Python discovers immutable data, and gets it wrong. Frozendict is a blunt instrument - instead of a mutable free-for-all, it just locks the data for the entire lifecycle. Brace for the wave of code littered with deep copies, proudly proclaiming how functional it all is. If you want real immutable data structures, not a cheap imitation, check out pyrsistent.", "context": "", "use_case": "immutable data structures", "switched_from": "", "story": "A \u201cfrozen\u201d dictionary for Python"}, {"id": 739714848, "item_id": 46232178, "url": "https://news.ycombinator.com/item?id=46232178", "by": "clickety_clack", "date": "2025-12-11", "stance": "recommend", "quote": "Maybe you should take a look at pyrsistent.", "excerpt": "Maybe you should take a look at pyrsistent. That allows you to make frozen \u201cmaps\u201d. You can \u201cevolve\u201d them into new versions of the objects and it keeps the references to the unchanged keys and values under the hood so it\u2019s fast and memory efficient.", "context": "", "use_case": "frozen dict-like maps", "switched_from": "", "story": "A \u201cfrozen\u201d dictionary for Python"}, {"id": 739680512, "item_id": 46230032, "url": "https://news.ycombinator.com/item?id=46230032", "by": "code_biologist", "date": "2025-12-11", "stance": "recommend", "quote": "a personal favorite library for frozen/immutable/hashable data structures", "excerpt": "Shoutout to pyrsistent, a personal favorite library for frozen/immutable/hashable data structures whenever I need to use lists, sets, or dicts as dict keys, or make sets of such items: https://github.com/tobgu/pyrsistent", "context": "", "use_case": "immutable data structures", "switched_from": "", "story": "A \u201cfrozen\u201d dictionary for Python"}]}