Hi! Long time reader, first time poster (I think).

I am trying to do a comparison on a particular list item. The list in question comes in this pair:

TotalStoreSales = Revenues + "," + Orders
TotalStoreSales = TotalStoreSales.split(",")

At this point, it has two values, both strings.

Then I attempt to do a comparison like so:

if (float(TotalStoreSales[0]) > 0):
    (does stuff)

I know that it is converting into a float - that I verified.

At any event, it keeps returning with this:

Traceback (most recent call last):
  File "./getMivaStoreTransactions.py", line 143, in ?
    TotalSales = TotalSales + getStoreStats(d[0],AllSales)
  File "./getMivaStoreTransactions.py", line 120, in getStoreStats
    if (float(TotalStoreSales[0]) > 0):
TypeError: unsubscriptable object

Maybe I am missing something someplace. Help?

 - Rilindo

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to