From 5fa0915d9f78cbed365c920d2160e1640f647ffb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 14 Aug 2022 22:14:54 -0700 Subject: [PATCH] src/sage/sets/family.py: NOTE -> WARNING, talk about factory later --- src/sage/sets/family.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/sage/sets/family.py b/src/sage/sets/family.py index d77d7c8e08d..19ce3707bea 100644 --- a/src/sage/sets/family.py +++ b/src/sage/sets/family.py @@ -65,11 +65,6 @@ def Family(indices, function=None, hidden_keys=[], hidden_function=None, r""" An immutable :class:`Container`, modeling a family `(f_i)_{i \in I}`. - :func:`Family` serves as a factory. Depending on its arguments, it constructs - an instance of a subclass of :class:`~sage.sets.family.AbstractFamily`. - Whenever possible, set and combinatorial operations (counting, iteration, - listing) on the family are induced from those of the ``indices``. - Like :class:`collections.abc.Mapping` subclasses such as :class:`dict`, it is an associative container, providing methods :meth:`~sage.sets.family.AbstractFamily.keys` and :meth:`~sage.sets.family.AbstractFamily.values`. @@ -87,7 +82,7 @@ def Family(indices, function=None, hidden_keys=[], hidden_function=None, :meth:`~sage.category.sets_cat.Sets.ParentMethods.cardinality` refer to the :meth:`~sage.sets.family.AbstractFamily.values` side of a `Family`. - .. NOTE:: + .. WARNING:: The current implementation often assumes that the function `f` is injective; if it is not, `__iter__` may repeat elements, and @@ -95,6 +90,9 @@ def Family(indices, function=None, hidden_keys=[], hidden_function=None, Equality of families takes the indices into account; it is not just equality of sets. + :func:`Family` serves as a factory. Depending on its arguments, it constructs + an instance of a subclass of :class:`~sage.sets.family.AbstractFamily`. + INPUT: - ``indices`` -- the indices (keys) for the family, or a :class:`dict`