@@ -20098,3 +20098,29 @@ For the most part it's transliterated from C, the major differences are:
outcome of a Python function call, so that it can be passed around.")
;; Choice of either license.
(license (list license:expat license:asl2.0))))
+
+(define-public python-immutables
+ (package
+ (name "python-immutables")
+ (version "0.14")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "immutables" version))
+ (sha256
+ (base32
+ "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
+ (build-system python-build-system)
+ (home-page
+ "https://github.com/MagicStack/immutables")
+ (synopsis "High-performance immutable mapping type for Python")
+ (description "@code{python-immutables} provides an immutable mapping
+type for Python. The underlying datastructure is a Hash Array Mapped Trie
+(HAMT), and it's used in Clojure, Scala, Haskell, and other functional
+languages. This implementation is used in CPython 3.7 in the contextvars module
+(see PEP 550 and PEP 567 for more details).
+
+Immutable mappings based on HAMT have O(log N) performance for both @code{set()}
+and @code{get()} operations, which is essentially O(1) for relatively
+small mappings.")
+ (license license:asl2.0)))