What is the purpose of __str__ and __repr__?
Difference between __str__ and __repr__?
Python __repr__ for numbers? How can I use `str.format` directly as `__repr__`? Purpose of Python's __repr__ What does !r do in str() and repr()? Why doesn't this __repr__ function return a string? When __repr__() is called? How can printing an object result in different output than both str() and repr()? Python - Understanding __repr__ Possible to change a function's repr in python? Why can you use eval() with the function repr(y) inside and not str(y)? Exception repr type: what does it means? Why is __repr__ called in the code below? Python repr function problem How can I return a list in __repr__ function? __repr__ for an attribute that can be a string or None? str() vs repr() functions in python 2.7.5 The difference between __str__ and __repr__? Main purpose of __repr__ in python Query on __repr__ method of a class in python Access class variables with __repr__() Python __repr__ and None python __repr__ Python object.__repr__(self) should be an expression? Can a python module have a __repr__? Which is a better __repr__ for a custom Python class? Custom __str__ and __repr__ are not working Python: how can I get an object's address in the __repr__ method? How to use __repr__ to create new object from it? Python proper use of __str__ and __repr__