I'll take a stab at this, 'repr' is the machine representation of the object while 'print' shows the human readable representation of the object. There are built in methods 'repr', 'str', and 'unicode' that can be used by programmers to implement the different printable representations of an object. Here is a simple example
class PrintObject(object):
def __repr__(self):
return 'repr'
def __str__(self):
return 'str'
def __unicode__(self):
return 'unicode'
Now if you load this object into a python shell and play around with it you can see how these different methods are used to represent the printable representation of the object
Python 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from printobject import PrintObject
>>> printObj = PrintObject()
>>> printObj
>>> repr(printObj)
'repr'
>>> str(printObj)
'str'
>>> unicode(printObj)
u'unicode'
The 'repr' method is used if you just type the instance and return
>>> printObj
repr
The 'str' method is used if you use print on the instance
>>> print(printObj)
str
and the 'unicode' method is used if you use the instance in a unicode string.
>>> print(u'%s' % printObj)
unicode
When and if you start writing your own classes these methods come in really handy.