String Object Not Callable When Using Tuples and Ints
<p>I am utterly flustered. I've created a list of tuples from a text file and done all of the conversions to ints: </p>

<pre><code>for line in f:
    if firstLine is True: #first line of file is the total knapsack size and # of items. 
        knapsackSize, nItems = line.split()
        firstLine = False 
    else:
        itemSize, itemValue = line.split()
        items.append((int(itemSize), int(itemValue)))
print items

knapsackSize, nItems = int(knapsackSize), int(nItems) #convert strings to ints
</code></pre>

<p>I have functions that access the tuples for more readable code: </p>

<pre><code>def itemSize(item): return item[0]
def itemValue(item): return item[1]
</code></pre>

<p>Yet when I call these functions, i.e.,:</p>

<pre><code>elif itemSize(items[nItems-1]) &gt; sizeLimit
</code></pre>

<p>I get an inexplicable <code>"'str' object is not callable"</code> error, referencing the foregoing line of code. I have type checked everything that should be a tuple or an int using instsanceof, and it all checks out. What gives? </p>
