From 3e81dd2292ac6262444c92c30462c85660fbe76b Mon Sep 17 00:00:00 2001
From: Alexandru Fikl <alexfikl@gmail.com>
Date: Sun, 26 Sep 2021 20:29:08 -0500
Subject: [PATCH] mention that serialize_container should be deterministic

---
 arraycontext/container/__init__.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arraycontext/container/__init__.py b/arraycontext/container/__init__.py
index 9eb3c45..23f980c 100644
--- a/arraycontext/container/__init__.py
+++ b/arraycontext/container/__init__.py
@@ -122,7 +122,10 @@ def serialize_container(ary: ArrayContainer) -> Iterable[Tuple[Any, Any]]:
     r"""Serialize the array container into an iterable over its components.
 
     The order of the components and their identifiers are entirely under
-    the control of the container class.
+    the control of the container class. However, the order is required to be
+    deterministic, i.e. two calls to :func:`serialize_container` on the same
+    array container should return an iterable with the components in the same
+    order.
 
     If *ary* is mutable, the serialization function is not required to ensure
     that the serialization result reflects the array state at the time of the
-- 
GitLab