#6903: [with patch, needs work] Function Word currently prevent the inheritance
of
Words_over_OrderedAlphabet
---------------------------+------------------------------------------------
Reporter: slabbe | Owner: slabbe
Type: defect | Status: assigned
Priority: major | Milestone: sage-combinat
Component: combinatorics | Keywords:
Reviewer: | Author:
Merged: |
---------------------------+------------------------------------------------
Comment(by saliola):
I am including two patches here.
In {{{trac_6903_reviewer_patch_1.patch}}}, I made the following changes:
1. I fixed the code that changes the class of a word
{{{FiniteWord_class}}} when it reaches the end of the iterator.
2. I changed {{{_classetype}}} to {{{_element_classes}}} since the method
defines the classes of the elements of the parent.
3. I also cleaned up the code for {{{_element_classes}}}.
4. Both {{{Words_all.__call__}}} and {{{Words_all._construct_word}}} run
{{{self._check}}}, so I am deleting the occurrence in
{{{Words_all._construct_word}}}.
In {{{trac_6903_reviewer_patch_2.patch}}}, I changed the method
{{{_element_classes}}} into an attribute (a {{{lazy_attribute}}},
actually). So it *is* the dictionary instead of returning the dictionary.
I think it is a bad idea to re-create that dictionary every time a word is
created.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6903#comment:3>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---