int() not working for floats?
<p>I recently ran into this in Python 3.5:</p>

<pre><code>&gt;&gt;&gt; flt = '3.14'
&gt;&gt;&gt; integer = '5'
&gt;&gt;&gt; float(integer)
5.0
&gt;&gt;&gt; float(flt)
3.14
&gt;&gt;&gt; int(integer)
5
&gt;&gt;&gt; int(flt)
Traceback (most recent call last):
  File "&lt;pyshell#7&gt;", line 1, in &lt;module&gt;
    int(flt)
ValueError: invalid literal for int() with base 10: '3.14'
</code></pre>

<p>Why is this? It seems like it should return <code>3</code>. Am I doing something wrong, or does this happen for a good reason?</p>