-
-
Notifications
You must be signed in to change notification settings - Fork 660
Closed
Description
Class deriving from sage.structure.UniqueRepresentation inherit a
unique representation behavior for their instances (and consistent
default implementations of equality testing, copying, pickling, ...).
See the documentation for a brief discussion of the relative merits of
UniqueRepresentation? and UniqueFactory?.
As a prerequisite, this patch implements sage.misc.ClasscallMetaclass,
a (trivial) metaclass for customizing class calls via a static method
of the class.
This class is used extensively in upcoming sage-combinat patches:
- Added crystal of letters for type E #5879 (crystals)
- Categories for the working mathematics programmer #5891 categories
- free modules
- automatic monoid
~500 lines of doctest for 15 lines of code
CC: @sagetrac-sage-combinat
Component: misc
Keywords: unique representation
Issue created by migration from https://trac.sagemath.org/ticket/5120