

def top_level(self):
    '\n        Print just the top level of an object, being sure to show where\n        it goes deeper\n        '
    output = {
        
    }
    if isinstance(self.obj, dict):
        for (name, item) in self.obj.items():
            if isinstance(item, dict):
                if item:
                    output[name] = StrReprWrapper('{...}')
                else:
                    output[name] = StrReprWrapper('{}')
            elif isinstance(item, list):
                if item:
                    output[name] = StrReprWrapper('[...]')
                else:
                    output[name] = StrReprWrapper('[]')
            else:
                output[name] = item
        return output
    else:
        return self.obj

dataset/ETHPy150Open haikuginger/beekeeper/beekeeper/exceptions.py TraversalError.top_level/original