title: How to convert rational and decimal number strings to floats in python?
body: <p>How can I convert strings which can denote decimal or rational numbers to floats</p>
  
  <pre><code>&gt;&gt;&gt; ["0.1234", "1/2"]
  ['0.1234', '1/2']
  </code></pre>
  
  <p>I'd want [0.1234, 0.5].</p>
  
  <p>eval is what I was thinking but no luck:</p>
  
  <pre><code>&gt;&gt;&gt; eval("1/2")
  0
  </code></pre>