weight

mathtools.weight(argument)

Gets weight of argument.

>>> import abjad
>>> abjad.mathtools.weight([-1, -2, 3, 4, 5])
15
>>> abjad.mathtools.weight([])
0

Defined equal to sum of the absolute value of items in argument.

Returns nonnegative integer.