#9107: Nested class name mangling can be wrong in case of double nesting
------------------------------+---------------------------------------------
Reporter: hivert | Owner: nthiery
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.10
Component: categories | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: Volker Braun, Florent Hivert
Authors: Simon King | Merged in:
Dependencies: #12808 | Stopgaps:
------------------------------+---------------------------------------------
Changes (by SimonKing):
* status: needs_work => needs_review
Old description:
> In the following class tree:
> {{{
> class Bla(UniqueRepresentation):
> class Bla1(UniqueRepresentation):
> class Bla11:
> Pass
> class Bla2:
> class Bla21:
> Pass
> }}}
> The names are set to
> {{{
> sage: Bla.Bla1.__name__
> 'Bla.Bla1'
> sage: Bla.Bla2.__name__
> 'Bla.Bla2'
> sage: Bla.Bla2.Bla21.__name__
> 'Bla.Bla2.Bla21'
> }}}
> But
> {{{
> sage: Bla.Bla1.Bla11.__name__
> 'Bla1.Bla11'
> }}}
> whereas one would expect {{{'Bla.Bla1.Bla11'}}}
> This breaks a lot of doc in categories and in particular in functorial
> constructions.
>
> Florent
New description:
In the following class tree:
{{{
class Bla(UniqueRepresentation):
class Bla1(UniqueRepresentation):
class Bla11:
Pass
class Bla2:
class Bla21:
Pass
}}}
The names are set to
{{{
sage: Bla.Bla1.__name__
'Bla.Bla1'
sage: Bla.Bla2.__name__
'Bla.Bla2'
sage: Bla.Bla2.Bla21.__name__
'Bla.Bla2.Bla21'
}}}
But
{{{
sage: Bla.Bla1.Bla11.__name__
'Bla1.Bla11'
}}}
whereas one would expect {{{'Bla.Bla1.Bla11'}}}
This breaks a lot of doc in categories and in particular in functorial
constructions.
__Apply__
- [attachment:trac9107_nesting_nested_classes.patch]
- [attachment:trac_9107_fix_cross_reference.patch]
--
Comment:
Building the docs works for me, and the `...` should be fixed now. Hence:
Needs review!
Apply trac9107_nesting_nested_classes.patch
trac_9107_fix_cross_reference.patch
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9107#comment:22>
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.