Python int() of a string that is a float number
<p>In all probability a stupid question, but I was wondering why python can't make a integer out of a string that is actually a float number.</p>

<pre><code>&gt;&gt;&gt; int(1.0)
1
&gt;&gt;&gt; int(float('1.0'))
1
</code></pre>

<p>But</p>

<pre><code>&gt;&gt;&gt; int('1.0')
Traceback (most recent call last):
  File "&lt;pyshell#17&gt;", line 1, in &lt;module&gt;
    int('1.0')
ValueError: invalid literal for int() with base 10: '1.0'
</code></pre>

<p>Can anyone clarify why it cant be done in one step?</p>
