Skip to content

Nested class name mangling can be wrong in case of double nesting #9107

@hivert

Description

@hivert

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

Depends on #12808

CC: @simon-king-jena @zabrocki

Component: categories

Author: Simon King, Nicolas M. Thiéry

Branch: 8b14e05

Reviewer: Volker Braun, Florent Hivert, Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/9107

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions