Skip to content
Snippets Groups Projects
Commit 1e951263 authored by Scott Wegner's avatar Scott Wegner Committed by tensorflow-copybara
Browse files

Improve an AnonymousTuple error message slightly:

 * Add space between sentences
 * Improve wording around how may fields may be shown

PiperOrigin-RevId: 270372166
parent 71f7e85c
No related branches found
No related tags found
No related merge requests found
......@@ -134,8 +134,8 @@ class AnonymousTuple(object):
def __getattr__(self, name):
if name not in self._name_to_index:
raise AttributeError(
'The tuple of length {:d} does not have named field "{!s}".'
'Names (only first 10): {!s}'.format(
'The tuple of length {:d} does not have named field "{!s}". '
'Fields (up to first 10): {!s}'.format(
len(self._element_array), name,
list(self._name_to_index.keys())[:10]))
return self._element_array[self._name_to_index[name]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment