Skip to content

Implement __repr__ magic for common classes #70

@brews

Description

@brews

Implementing __repr__ magic methods for our most commonly used classes would help error output and debugging.

Printing objects or having them dumped in a traceback gives us a class name and a memory address. It would save ssssoooo much time to get more info in this output. Ideally we could quickly fix this by implementing __repr__ methods and having it print out class names and instantiating parameters. So a RollingCalculation instance (made up example) prints as RollingCalculation(method="median", window_size=30).

Suggest implementing __repr__ because this is also the fallback for __str__ magic, too. Too birds with one stone.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions