#18174: Generalize base class construction for functorial construction
categories
-------------------------------------+-------------------------------------
Reporter: tscrim | Owner: tscrim
Type: enhancement | Status: positive_review
Priority: major | Milestone: sage-6.6
Component: categories | Resolution:
Keywords: | Merged in:
Authors: Travis Scrimshaw | Reviewers: Nicolas ThiƩry
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/categories/functorial_magic-18174|
c35a27022e3199f3b2f05d3550e747b4cdd574b5
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Description changed by nthiery:
Old description:
> We generalize the magic functions in `GradedModulesCategory` so we can
> don't have to copy `_base_category_class` with minor changes and
> `__classcall__` in order to have separate files for categories created by
> a functorial construction.
New description:
This ticket implements the following syntactic sugar for functorial
construction categories::
{{{
GradedModules(K) -> Modules(K).Graded()
Modules.Graded(K) -> Modules(K).Graded()
}}}
This makes them behave consistently with `CategoryWithAxiom`.
As is noted in the code, the internal logic is very similar, but there
seemed at this point to be no good way to avoid the duplication.
The first syntactic sugar was actually already partially implemented
for `GradedModulesCategory`, so half of the work is just generalizing
existing code.
The syntactic sugar is not valid for construction categories that take
extra arguments like `Algebras`, since there is no generic way to
decide what the argument should be used for:
{{{
Sets.Algebras(K) -> Sets(K).Algebras() or Sets().Algebras(K) ?
}}}
--
--
Ticket URL: <http://trac.sagemath.org/ticket/18174#comment:5>
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.