def get_size ( objects ) : res = 0 for o in objects : try : res += _getsizeof ( o ) except AttributeError : print ( "IGNORING: type=%s; o=%s" % ( str ( type ( o ) ) , str ( o ) ) ) return res
python get size of all objects
Compute the total size of all elements in objects .
def get_size(objects):
    """Compute the total size of all elements in objects."""
    res = 0
    for o in objects:
        try:
            res += _getsizeof(o)
        except AttributeError:
            print("IGNORING: type=%s; o=%s" % (str(type(o)), str(o)))
    return res