New in version 2.0.
Change assignable rational to dot count:
abjad> from abjad.tools import durationtools
abjad> for n in range(1, 9):
... try:
... rational = Fraction(n, 16)
... dot_count = durationtools.assignable_rational_to_dot_count(rational)
... print '%s\t%s' % (rational, dot_count)
... except AssignabilityError:
... pass
...
1/16 0
1/8 0
3/16 1
1/4 0
3/8 1
7/16 2
1/2 0
Raise assignability error when rational not assignable.
Return nonnegative integer.