def safeformat(obj):
return _call_and_format_exception(pprint.pformat, obj)<EOL>
return a pretty printed string for the given object.
    Failing __repr__ functions of user instances will be represented
    with a short exception info.