(Pdb) lstValues
[[Decimal("1"), Decimal("47.0")]]
(Pdb) agg
[0, 1]
(Pdb) print list([sum(v[i] for i in range(len(agg))) for v in lstValues])
*** NameError: global name 'v' is not defined
(Pdb)
However, the Python interpreter is happy with it if entered directly:
[[Decimal("1"), Decimal("47.0")]]>>lstValues
[Decimal("48.0")]>>agg = [0,1]
print list([sum(v[i] for i in range(len(agg))) for v in lstValues])
There seems to be some sort of scope problem in PDB.>>>
--
Dale Strickland-Clark