Why does float('3') apparently return a TypeError in Python 2.6.8?
<p>I have (anonymized) a hash constructed from values in Python 2.6.8:</p>

<pre><code>sys.stderr.write('#' + str(dictionary['Field 4']) + '#\n')
kpis_found.append(float(int(dictionary['Field 1']), 1) *
    max(float(dictionary['Field 2']), 1) *
    max(float(dictionary['Field 3']), 1) *
    max(float(dictionary['Field 4']), 1) *
    max(float(dictionary['Field 5']), 1))
</code></pre>

<p>The output I get is:</p>

<pre><code>[Fri Jul 13 09:04:44 2012] [error] [client ::1] #3#
[Fri Jul 13 09:04:44 2012] [error] [client ::1] Traceback (most recent call last):
[Fri Jul 13 09:04:44 2012] [error] [client ::1]   File "/Users/jonathan/mirror/civic/google_maps/index.cgi", line 357, in &lt;module&gt;
[Fri Jul 13 09:04:44 2012] [error] [client ::1]     max(float(dictionary['Field 4']), 1) *
[Fri Jul 13 09:04:44 2012] [error] [client ::1] TypeError: float() takes at most 1 argument (2 given)
</code></pre>

<p>To the best of my knowledge, the CSV files yield (usually) strings convertible to ints, or (occasionally) strings convertible to floats. If I run into a NULL, that should be easier to diagnose. The debugging output appears to confirm that the field in question is '3'.</p>

<p>How is this getting a TypeError? I've run through parentheses to ensure that I'm not calculating</p>

<pre><code>max(float(foo, bar))
</code></pre>

<p>but instead calculating</p>

<pre><code>max(float(foo), bar)
</code></pre>

<p>Any insight would be welcome.</p>
