You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 aRollingCalculation
instance (made up example) prints asRollingCalculation(method="median", window_size=30)
.Suggest implementing
__repr__
because this is also the fallback for__str__
magic, too. Too birds with one stone.The text was updated successfully, but these errors were encountered: