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. rendered by a django application. hosted by webfaction.