Replace backticks with repr() or "%r"

From SF patch #852334.
This commit is contained in:
Walter Dörwald 2004-02-12 17:35:32 +00:00
parent ecfeb7f095
commit 70a6b49821
246 changed files with 926 additions and 962 deletions

View file

@ -212,7 +212,7 @@ def _safe_repr(object, context, maxlevels, level):
typ = _type(object)
if typ is str:
if 'locale' not in _sys.modules:
return `object`, True, False
return repr(object), True, False
if "'" in object and '"' not in object:
closure = '"'
quotes = {'"': '\\"'}
@ -226,7 +226,7 @@ def _safe_repr(object, context, maxlevels, level):
if char.isalpha():
write(char)
else:
write(qget(char, `char`[1:-1]))
write(qget(char, repr(char)[1:-1]))
return ("%s%s%s" % (closure, sio.getvalue(), closure)), True, False
r = typ.__repr__
@ -288,7 +288,7 @@ def _safe_repr(object, context, maxlevels, level):
del context[objid]
return format % _commajoin(components), readable, recursive
rep = `object`
rep = repr(object)
return rep, (rep and not rep.startswith('<')), False