Skip to content

[ENH] should get_tag and get_class_tag be merged into a single method? #561

Description

@fkiraly

API design discussion on whether, ultimately, we should endeavour to merge get_tag and get_class_tag into a single method. Similarly, get_tags and get_class_tags.

Currently, the two methods are mostly complementary, doing the same thing for classes vs instances. On classes, get_class_tag has to be called, and get_tag will fail. On instances, get_tag has to be called, and get_class_tag will work - retrieving the default/base setting of the tag, as opposed to dynamically set tags.

If we would merge the method, some redundancy would be removed, but it would no longer be programmatically possible to retrieve the base setting via get_class_tag - except if we add another parameter.

We could also leave get_class_tag while routing get_tag calls to get_class_tag for classes, but that might violate python zen.

An experimental, illustrative PR can be found here: #560

Metadata

Metadata

Assignees

No one assigned

    Labels

    API designAPI design & software architecture

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions