This shouldn't be necessary. Python will do this automatically. http://docs.python.org/2/reference/datamodel.html#object.__repr__