I was testing a fix using pdb.set_trace() to make sure it worked the way I expected before implementing it and kept getting a weird error.
pdb.set_trace()
(Pdb
pdb isn't a full python shell, and intercepts a lot of things. But adding a print in front of it should work:
pdb
print
print max(range(len(test)),key=lambda i: test[i])