str

str([object])

Returns a string containing a nicely printable representation of an object. For strings, this returns the string itself. The difference with repr(object) is that str(object) does not always attempt to return a string that is acceptable to eval; its goal is to return a printable string. If no argument is given, returns the empty string, ''.

To make this function work on your own classes, implement the __str__ method. If __str__ isn’t defined, this function falls back on __repr__.

 

A Django site. this page was rendered by a django application in 0.01s 2008-08-28 02:15:23.185276. hosted by webfaction.