(val)
| 130 | |
| 131 | |
| 132 | def _repr_binary_bytes(val): |
| 133 | # type: (bytes) -> str |
| 134 | try: |
| 135 | return val.decode('utf-8') |
| 136 | except UnicodeDecodeError: |
| 137 | # possibly not unicode, but binary data so format as hex. |
| 138 | return val.hex() |
| 139 | |
| 140 | |
| 141 | def _format_chars(val, maxlen): |
no test coverage detected