title: Find the number of digits in the fractional part of a Decimal number in python
body: <p>Given a <code>Decimal</code> number in python how can I find the number of digits past the decimal point? </p>
  
  <pre><code>assert digits(Decimal('1.2345')) == 4
  assert digits(Decimal('1000'))   == 0
  assert digits(Decimal('1.00'))   == 2
  assert digits(Decimal('1E+5'))   == 0
  assert digits(Decimal('1.2E+5')) == 0
  </code></pre>