I was looking at the builtin object methods in the Python documentation, and I was interested in the documentation for object.__repr__(self). Here\'s what it sa
'repr' means represention. First,we create an instance of class coordinate.
x = Coordinate(3, 4)
Then if we input x into console,th output is
<__main__.Coordinate at 0x7fcd40ab27b8>
If you use repr():
>>> repr(x)
Coordinate(3, 4)
the output is as same as 'Coordinate(3, 4)',except it is a string.You can use it to recreate a instance of coordinate.
In conclusion,repr() meathod is print out a string,which is the representation of the obeject.