Skip to content

Commit c0ae7b5

Browse files
committed
Add __repr__ method to Sequence.
1 parent b2b3c6e commit c0ae7b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tensorflow_datasets/core/features/sequence_feature.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ def __setstate__(self, state):
194194
del state['__getattr__']
195195
self.__dict__.update(state)
196196

197-
def _additional_repr_info(self):
198-
"""Override to return additional info to go into __repr__."""
199-
return {'feature': repr(self._feature)}
197+
def __repr__(self):
198+
"""Display the feature."""
199+
return '{}({})'.format(type(self).__name__, self._feature)
200200

201201

202202
def stack_arrays(*elems):

0 commit comments

Comments
 (0)