guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#41807] [PATCH 02/26] gnu: Add python-immutables.


From: Giacomo Leidi
Subject: [bug#41807] [PATCH 02/26] gnu: Add python-immutables.
Date: Thu, 11 Jun 2020 17:13:33 +0200

* gnu/packages/python-xyz.scm (python-immutables): New variable.
---
 gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 11630d4818..106a6802bd 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -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)))
-- 
2.26.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]