(object_)
return retval
Returns total size of a given object_ (in bytes)
Returns total size of a given object_ (in bytes)
Returns total size of a given object_ ( in bytes )
def _size_of(object_):
    """
    Returns total size of a given object_ (in bytes)
    """

    retval = sys.getsizeof(object_, DEFAULT_SIZE_OF)
    if isinstance(object_, dict):
        retval += sum(_size_of(_) for _ in itertools.chain.from_iterable(object_.items()))
    elif hasattr(object_, "__iter__"):
        retval += sum(_size_of(_) for _ in object_)
    return retval
def _size_of ( object_ ) : retval = sys . getsizeof ( object_ , DEFAULT_SIZE_OF ) if isinstance ( object_ , dict ) : retval += sum ( _size_of ( _ ) for _ in itertools . chain . from_iterable ( object_ . items ( ) ) ) elif hasattr ( object_ , "__iter__" ) : retval += sum ( _size_of ( _ ) for _ in object_ ) return retval