def sum_layout_dimensions(dimensions):
 min = sum([d.min for d in dimensions if (d.min is not None)])
 max = sum([d.max for d in dimensions if (d.max is not None)])
 preferred = sum([d.preferred for d in dimensions])
 return LayoutDimension(min=min, max=max, preferred=preferred)

def sum_layout_dimensions ( dimensions ) : min = sum ( [ d . min for d in dimensions if ( d . min is not None ) ] ) max = sum ( [ d . max for d in dimensions if ( d . max is not None ) ] ) preferred = sum ( [ d . preferred for d in dimensions ] ) return LayoutDimension ( min = min , max = max , preferred = preferred )
sum a list of :class: .