Skip to content

Parameter to call #21

@matham

Description

@matham

Generally, a function should not return different types of things depending on a argument passed to it. Instead, it's generally preferable to split it into 2 functions. Matplotlib violates this a lot and returns different things based on the input and it's annoying af.

If we need __call__ to return the combinations, I'd suggest we only return that and have a different method e.g. get_data_frame that returns a data frame when called. Although I'm not sure we should use pandas so much in the codebase because there are downsides to making that a dependency of the framework.

Originally posted by @matham in #1 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions