Skip to content

Docstring duplications #19

@nikohansen

Description

@nikohansen

We have now four archive classes with (almost) identical interfaces and quite a bit of undesirable duplication of docstrings (or lack thereof) for the respective methods. This cannot be directly solved by inheritance, because the inheriting subclass overwrites the methods of the interface.

A possible fix is to define a class which provides the docstrings, say MOArchiveDocstrings (or MOArchiveParent), and use them like

def hypervolume_plus(self):
    ___doc__ = MOArchiveDocstrings.hypervolume_plus.__doc__ + """

    subclass specific remarks, doctests,...
    """

see for example https://stackoverflow.com/questions/2025562/inherit-docstrings-in-python-class-inheritance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions