Since I ran into the same question with named matrix groups (SL/GL/...) I second that: separate out the cached constructor from the unique comparison so the user can use whichever suits best.
On Sunday, February 17, 2013 7:59:49 AM UTC, Simon King wrote: > > - have a new class CachedRepresentation, that uses a __classcall__ with a > @weak_cached_function decorator and provides pickling, but does not > provide > __hash__ or __eq__. Hence, objects with different representations could > still be equal. > > - have UniqueRepresentation, that inherits from CachedRepresentation and > *forces* the use of very fast __hash__ and comparison methods relying on > id. The hash and comparison could not be overridden in sub-classes. > > So, named groups could inherit from CachedRepresentation, and the use of > UniqueRepresentation could be reserved to those things that are supposed > to provide the unique parent condition (which is not the case for named > groups). > > Cheers, > Simon > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
