stringutil: teach pprint about tuples
authorAugie Fackler <augie@google.com>
Fri, 27 Apr 2018 13:15:16 -0400
changeset 37932 bf6bb710b40f
parent 37931 faa41fd282d1
child 37933 f71c97d9b97b
stringutil: teach pprint about tuples Differential Revision: https://phab.mercurial-scm.org/D3521
mercurial/utils/stringutil.py
--- a/mercurial/utils/stringutil.py	Thu Apr 19 21:00:12 2018 +0900
+++ b/mercurial/utils/stringutil.py	Fri Apr 27 13:15:16 2018 -0400
@@ -46,6 +46,8 @@
         return '%d' % o
     elif isinstance(o, float):
         return '%f' % o
+    elif isinstance(o, tuple):
+        return '(%s)' % (b', '.join(pprint(a, bprefix=bprefix) for a in o))
     elif o is None:
         return b'None'
     else: