-
-
Notifications
You must be signed in to change notification settings - Fork 660
Open
Description
The constructors Family
and Set
are intended to construct an immutable Parent
.
We equip the implementation classes with trivial __copy__
and __deepcopy__
methods that just return self
.
Parents that subclass CachedRepresentation
/UniqueRepresentation
already have these methods, but the implementation classes of Family
and Set
do not.
Slightly tricky is the question how to deal with mutable elements. Set
documents that:
Sets with unhashable objects work, but with less functionality::
sage: B = Set([QQ, [3, 1], 5]) # unhashable
Should a copy be made? Should it be documented that by creating the Set, a mutable element belongs to the set object in the sense of object ownership and it is an error to mutate it?
Component: refactoring
Issue created by migration from https://trac.sagemath.org/ticket/32462