#5120: [with patch, needs review] An alternative implementation of the Unique
Representation design pattern
-----------------------------------+----------------------------------------
 Reporter:  nthiery                |        Owner:  nthiery 
     Type:  enhancement            |       Status:  new     
 Priority:  major                  |    Milestone:  sage-4.0
Component:  misc                   |   Resolution:          
 Keywords:  unique representation  |  
-----------------------------------+----------------------------------------
Changes (by nthiery):

  * keywords:  => unique representation


Old description:

> Class deriving from sage.structure.UniqueRepresentation class inherit a
> unique representation behavior for their instances. See the documentation
> for a brief discussion of the relative merits of UniqueRepresentation and
> UniqueFactory.
> This is also a generalization of the already existing class
> sage.categories.category.uniq1, which it will eventually supersede in the
> category patch.
>
> This class will be used extensively in upcoming patches (unique
> representation of categories, combinatorial free modules, ...)
>
> Class deriving from sage.structure.UniqueRepresentation? inherit a
> unique representation behavior for their instances (and consistent
> default implementations of equality testing, copying, pickling, ...).
>
> This class is used extensively in upcoming sage-combinat patches:
>  - #5879 (crystals)
>  - categories
>  - free modules

New 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:
  - #5879 (crystals)
  - #5891 categories
  - free modules
  - automatic monoid

 ~500 lines of doctest for 15 lines of code

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5120#comment:17>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to