diff --git a/synchronicity/synchronizer.py b/synchronicity/synchronizer.py index c829ae8..1be6482 100644 --- a/synchronicity/synchronizer.py +++ b/synchronicity/synchronizer.py @@ -258,11 +258,11 @@ def _translate_scalar_out(self, obj, interface): return obj def _recurse_map(self, mapper, obj): - if type(obj) == list: + if isinstance(obj, list): return list(self._recurse_map(mapper, item) for item in obj) - elif type(obj) == tuple: + elif isinstance(obj, tuple): return tuple(self._recurse_map(mapper, item) for item in obj) - elif type(obj) == dict: + elif isinstance(obj, dict): return dict((key, self._recurse_map(mapper, item)) for key, item in obj.items()) else: return mapper(obj)