Rename recursive_map -> _recursive_list_map as requested in review

This commit is contained in:
Bruno Oliveira 2018-08-01 15:17:58 -03:00
parent 43664d7841
commit a5c0fb7f6b
1 changed files with 3 additions and 3 deletions

View File

@ -101,9 +101,9 @@ class ApproxBase(object):
pass pass
def recursive_map(f, x): def _recursive_list_map(f, x):
if isinstance(x, list): if isinstance(x, list):
return list(recursive_map(f, xi) for xi in x) return list(_recursive_list_map(f, xi) for xi in x)
else: else:
return f(x) return f(x)
@ -114,7 +114,7 @@ class ApproxNumpy(ApproxBase):
""" """
def __repr__(self): def __repr__(self):
list_scalars = recursive_map(self._approx_scalar, self.expected.tolist()) list_scalars = _recursive_list_map(self._approx_scalar, self.expected.tolist())
return "approx({!r})".format(list_scalars) return "approx({!r})".format(list_scalars)
if sys.version_info[0] == 2: if sys.version_info[0] == 2: