changeset 37942 | 32bc3815efae |
parent 37941 | af83a0ed0afb |
child 38261 | f3033692ccef |
37941:af83a0ed0afb | 37942:32bc3815efae |
---|---|
21 encoding, |
21 encoding, |
22 error, |
22 error, |
23 pycompat, |
23 pycompat, |
24 ) |
24 ) |
25 |
25 |
26 def pprint(o, bprefix=True): |
26 def pprint(o, bprefix=False): |
27 """Pretty print an object.""" |
27 """Pretty print an object.""" |
28 if isinstance(o, bytes): |
28 if isinstance(o, bytes): |
29 if bprefix: |
29 if bprefix: |
30 return "b'%s'" % escapestr(o) |
30 return "b'%s'" % escapestr(o) |
31 return "'%s'" % escapestr(o) |
31 return "'%s'" % escapestr(o) |