#16296: Speed improvements for categories with axioms
-------------------------------------+-------------------------------------
Reporter: SimonKing | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.3
Component: categories | Resolution:
Keywords: cython | Merged in:
performance categories | Reviewers:
Authors: | Work issues:
Report Upstream: N/A | Commit:
Branch: | 9a420ad15fc941dfd3b3a12d005b4f814407a008
u/SimonKing/ticket/16296 | Stopgaps:
Dependencies: #10963, #15801, |
#16309 |
-------------------------------------+-------------------------------------
Comment (by SimonKing):
Interestingly, with #16309 alone, the tests of sageinspect.py pass. But
adding the commits from here, one test in sageinspect.py fails:
{{{
sage: C = Rings()
sage: HC = C.hom_category()
sage: sage_getsourcelines(HC)
([' class HomCategory(HomCategory):\n', ...], ...)
}}}
is expected, but the indentation (that is due to the nesting) is wrong.
Actually it is even more wrong than that: The relevant class is defined as
a nested class in sage.categories.rings, but we get
{{{
sage: from sage.misc.sageinspect import _sage_getdoc_unformatted
sage: _sage_getdoc_unformatted(HC)
"File: sage/categories/category.pyx (starting at line 2361)\n\n
Initializes this HomCategory\n\n INPUT:\n - ``category`` --
the category whose Homsets are the objects of this category.\n -
``name`` -- An optional name for this category.\n\n EXAMPLES:\n\n
We need to skip one test, since the hierarchy of hom categories isn't\n
consistent yet::\n\n sage: C =
sage.categories.category.HomCategory(Rings()); C\n Category of
hom sets in Category of rings\n sage:
TestSuite(C).run(skip=['_test_category_graph'])\n "
}}}
That's all really strange. The code of the nested class is
{{{
class HomCategory(HomCategory):
pass
}}}
and indeed we have
{{{
sage: HC.__doc__
}}}
Why is _sage_getdoc_unformatted returning something nonempty, even though
the class has empty `__doc__`?
--
Ticket URL: <http://trac.sagemath.org/ticket/16296#comment:21>
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.