#11900: Serious regression caused by #9138
----------------------------------------------------------------------------------------+
Reporter: SimonKing
| Owner: tbd
Type: defect
| Status: needs_work
Priority: critical
| Milestone: sage-4.8
Component: performance
| Keywords: categories regression
Work_issues: Laurent series rings are fields. Add docs. Don't use is_ring and
friends | Upstream: N/A
Reviewer: Jeroen Demeyer, Nicolas M. ThiƩry
| Author: Simon King
Merged:
| Dependencies: #9138 #11911
----------------------------------------------------------------------------------------+
Comment(by nthiery):
Replying to [comment:121 SimonKing]:
> There is something wrong with Category_singleton: It cant' be
subclassed.
>
> {{{
> sage: class Test(Rings):
> ....: pass
> ....:
> sage: T = Test()
> sage: T
> Category of rings
> }}}
>
> In other words, making `__classcall__` a lazy class attribute won't
work, since subclasses need a different `__classcall__`.
>
> Or do you see a mechanism that allows for subclassing?
>
> The problem occurs if one makes `EnumeratedSets` inherit from
Category_singleton, since `DeBruijnSequences` subclass enumerated sets.
I still need to thing about the rest. For that issue, maybe
Category_singleton should define __classcall_private__ instead of
__classcall__ (see ClasscallMetaclass for the difference)?
Hmm, no, that probably won't work since we want to subclass
Category_singleton. I assume the wrong thing is that DeBruijnSequences
subclasses EnumeratedSets, where the intention probably was to be a
subcategory.
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11900#comment:122>
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 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.