Kaydet (Commit) 460ff20c authored tarafından Just van Rossum's avatar Just van Rossum

String values will now always be shown with quotes, so one can see the…

String values will now always be shown with quotes, so one can see the difference between the value 2 and the value '2'. -- jvr
üst 5bd608d4
...@@ -22,9 +22,7 @@ def double_repr(key, value, truncvalue = 0, ...@@ -22,9 +22,7 @@ def double_repr(key, value, truncvalue = 0,
key = str(key) key = str(key)
else: else:
key = _repr(key) key = _repr(key)
if type(value) == StringType and has_ctlchars(value) < 0: if key == '__builtins__':
value = str(value)
elif key == '__builtins__':
value = "<" + type(value).__name__ + " '__builtin__'>" value = "<" + type(value).__name__ + " '__builtin__'>"
elif key == '__return__': elif key == '__return__':
# bleh, when returning from a class codeblock we get infinite recursion in repr. # bleh, when returning from a class codeblock we get infinite recursion in repr.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment