When implementing the
__repr__() method, do all object attributes have to be used when constructing the string?
While you are allowed to include or exclude any information from the object that you want, the Python documentation recommends that the implementation for
__repr__() should contain as much information as possible and if, at all possible, it should contain whatever is necessary to recreate the object. The
__str__() method also returns a string representing the object but it can be used for a more informal representation of the object.