Fixed function using the wrong dictionary on iteration
This commit is contained in:
parent
2eed0e4776
commit
331f62f9bd
|
@ -1,6 +1,5 @@
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
||||||
# Constantes para indexar os tuplos:
|
# Constantes para indexar os tuplos:
|
||||||
NAME, DATE, OPEN, MAX, MIN, CLOSE, VOLUME = 0, 1, 2, 3, 4, 5, 6
|
NAME, DATE, OPEN, MAX, MIN, CLOSE, VOLUME = 0, 1, 2, 3, 4, 5, 6
|
||||||
|
|
||||||
|
@ -41,7 +40,7 @@ def loadStockFile(filename):
|
||||||
def totalVolume(lst):
|
def totalVolume(lst):
|
||||||
totVol = {}
|
totVol = {}
|
||||||
# Complete ...
|
# Complete ...
|
||||||
for tup in totVol:
|
for tup in lst:
|
||||||
if tup[NAME] not in totVol:
|
if tup[NAME] not in totVol:
|
||||||
totVol[tup[NAME]] = tup[VOLUME]
|
totVol[tup[NAME]] = tup[VOLUME]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue