title: How to write Fraction as decimal with x DPs in Python?
body: <p>What I'm looking for is a way to write out a python Fraction() type to an arbitrary number of decimal places. I've looked at the python docs for Fraction and Decimal, but I can't see any way to convert or to write out the Fraction.</p>
  
  <p>So what I'm looking for is some way to print out</p>
  
  <pre><code>Fraction(5, 7)
  </code></pre>
  
  <p>as</p>
  
  <pre><code>0.7142857142857142857142857142857142857142857142857142
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>&gt;&gt; float(Fraction(5, 7))
  0.7142857142857143
  </code></pre>
  
  <p>Specifying the number of DPs.</p>