Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement __repr__ magic for common classes #70

Open
brews opened this issue Feb 4, 2021 · 0 comments
Open

Implement __repr__ magic for common classes #70

brews opened this issue Feb 4, 2021 · 0 comments

Comments

@brews
Copy link
Member

brews commented Feb 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant