#8524: DisjointUnionEnumeratedSets should have a private __classcall__ method
------------------------------+---------------------------------------------
Reporter: hivert | Owner: hivert
Type: defect | Status: new
Priority: major | Milestone: sage-4.3.4
Component: combinatorics | Keywords: DisjointUnionEnumeratedSets,
inheritance
Author: Florent Hivert | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Changes (by hivert):
* owner: sage-combinat => hivert
Old description:
> In order to be easily inherited from, {{{DisjointUnionEnumeratedSets}}}
> should have a private {{{__classcall__}}} method. Indeed most of the
> time, when inheriting from it, the family used in the union will be
> constructed in the {{{__init__}}} method of the subclass. Having
> {{{__classcall__}}} inherited force the user to have its own
> {{{__classcall__}}}.
New description:
In order to be easily inherited from, {{{DisjointUnionEnumeratedSets}}}
should have a private {{{__classcall__}}} method. Indeed most of the time,
when inheriting from it, the family used in the union will be constructed
in the {{{__init__}}} method of the subclass. Having {{{__classcall__}}}
inherited force the user to have its own {{{__classcall__}}}.
There isn't yet any example of that in sage but there are at least three
of them comming in sage-combinat (trees, parking functions, Transitive
groups). Dozens of them will follow along the cleanup of combinat.
However, as expected :-), there is already a counterexample (crystal). I
took care of it. Due to the need of both behavior, I've written two small
demo examples of this two use cases.
I also took the chance to fixe some typos in the doc.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8524#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
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.