#13589: Controlling C3 to solve once for all the Method Resolution Order issues
for
category classes
----------------------------------------------------------+-----------------
Reporter: nthiery | Owner:
nthiery
Type: defect | Status:
needs_review
Priority: major | Milestone:
sage-5.10
Component: categories | Resolution:
Keywords: method resolution order, C3 | Work issues:
Report Upstream: N/A | Reviewers:
Simon King, Florent Hivert
Authors: Nicolas M. ThiƩry | Merged in:
Dependencies: #13501, #12894, #12876, #11935, #12895 | Stopgaps:
----------------------------------------------------------+-----------------
Comment (by nthiery):
Hi Simon!
It turns out that I had just fooled myself because of a typo in the test.
Even for this example, the number of bases to be added *does* depend on
the linear extension.
So all is good, the python/cython implementations agree.
The updated patch:
- fixes the typos you mentionned
- reworks a bit the text to make it clearer that the code implements an
optimized "add bases" trick which does not have the drawbacks of the brute
force approach.
- fixes the incorrect doctest, and gather some stats on the number of
bases to be added for each linear extension
- mentions the removed doctests, and the rationale for removing them, in
the patch header
There remains to decide between a lazy attribute or a cached method for
_cmp_key. Any idea on how to investigate the startup time welcome.
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13589#comment:26>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.