We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd36a64 commit 6a10ba9Copy full SHA for 6a10ba9
ipywidgets/widgets/widget_media.py
@@ -117,12 +117,10 @@ def _get_repr(self, cls):
117
# Return value first like a ValueWidget
118
signature = []
119
120
- # strip off the starting b' and ending ' so we can truncate if needed
121
- sig_value = repr(self.value[:100].tobytes())[2:-1]
122
-
123
- if self.value.nbytes > 100:
124
- sig_value += '...'
125
- signature.append("{}=b'{}'".format('value', sig_value))
+ sig_value = 'value={!r}'.format(self.value[:100].tobytes())
+ if len(sig_value) > 120:
+ sig_value = sig_value[:-1]+"..."+sig_value[-1]
+ signature.append(sig_value)
126
127
for key in super(cls, self)._repr_keys():
128
if key == 'value':
0 commit comments