#17021: Faster creation of words by the parent
-------------------------+-------------------------------------------------
Reporter: | Owner:
slabbe | Status: needs_info
Type: | Milestone: sage-6.4
enhancement | Resolution:
Priority: major | Merged in:
Component: | Reviewers:
combinatorics | Work issues:
Keywords: | Commit:
Authors: | 9008b8d2986614ece259a54274ae054ef5fad40d
Sébastien Labbé | Stopgaps:
Report Upstream: N/A |
Branch: |
u/slabbe/17021 |
Dependencies: |
-------------------------+-------------------------------------------------
Changes (by vdelecroix):
* status: needs_review => needs_info
Comment:
Hello,
1) what is the point of
{{{
+ word_classes = self._element_classes
+ cls_str = 'FiniteWord_list'
+ return word_classes[cls_str](parent=self, data=data)
}}}
instead of
{{{
+ return self._element_classes['FiniteWord_list'](parent, data)
}}}
2) Calling directly `.finite_word_tuple()` or `.finite_word_list()` from
the methods in `FiniteWord` is bad. Doing that you impose the return type
to be `FiniteWord_list` or `FiniteWord_tuple` (you might prefer a
`FiniteWord_char` sometimes). Instead of using directly those, I would
rather introduce a `check` argument in `__call__` and do not use them in
methods of `FiniteWord`.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/17021#comment:3>
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 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-trac.
For more options, visit https://groups.google.com/d/optout.