def _saferepr(obj):
 repr = py.io.saferepr(obj)
 if py.builtin._istext(repr):
  t = py.builtin.text
 else:
  t = py.builtin.bytes
 return repr.replace(t('\n'), t('\\n'))

def _saferepr ( obj ) : repr = py . io . saferepr ( obj ) if py . builtin . _istext ( repr ) : t = py . builtin . text else : t = py . builtin . bytes return repr . replace ( t ( '\n' ) , t ( '\\n' ) )
get a safe repr of an object for assertion error messages .