def dumpable(obj): """indicates whether the object is dumpable by brine""" if type(obj) in simple_types: return True if type(obj) in (tuple, frozenset): return all(dumpable(item) for item in obj) return False
def dumpable(obj): """Indicates whether the given object is *dumpable* by brine :returns: ``True`` if the object is dumpable (e.g., dumps would succeed), ``False`` otherwise """ if type(obj) in simple_types: return True if type(obj) in (tuple, frozenset): return all(dumpable(item) for item in obj) return False
def dumpable(obj): """Indicates whether the given object is *dumpable* by brine :returns: ``True`` if the object is dumpable (e.g., :func:`dump` would succeed), ``False`` otherwise """ if type(obj) in simple_types: return True if type(obj) in (tuple, frozenset): return all(dumpable(item) for item in obj) if type(obj) is slice: return dumpable(obj.start) and dumpable(obj.stop) and dumpable(obj.step) return False
def dumpable(obj): """Indicates whether the given object is *dumpable* by brine :returns: ``True`` if the object is dumpable (e.g., dumps would succeed), ``False`` otherwise """ if type(obj) in simple_types: return True if type(obj) in (tuple, frozenset): return all(dumpable(item) for item in obj) if type(obj) is slice: return dumpable(obj.start) and dumpable(obj.stop) and dumpable( obj.step) return False