From: Terry Reedy on 1 Jun 2010 18:06 I got this error twice today while creating lists of lists of complicated stuff. The first time I was puzzled, but the second time I knew that I had just forgotten a comma. If you google this, you will too. Reduced example >>> [[1,2,3] # forgot comma [4,5,6]] Traceback (most recent call last): File "<pyshell#10>", line 2, in <module> [4,5,6]] TypeError: list indices must be integers, not tuple Terry Jan Reedy
From: Jon Clements on 1 Jun 2010 18:30 On 1 June, 23:06, Terry Reedy <tjre...(a)udel.edu> wrote: > I got this error twice today > while creating lists of lists > of complicated stuff. > The first time I was puzzled, > but the second time I knew > that I had just forgotten a comma. > If you google this, you will too. > > Reduced example > >>> [[1,2,3] # forgot comma > [4,5,6]] > Traceback (most recent call last): > File "<pyshell#10>", line 2, in <module> > [4,5,6]] > TypeError: list indices must be integers, not tuple > > Terry Jan Reedy Umm... +1 for poetic effort? Jon.
|
Pages: 1 Prev: Drawing Multigraphs Next: Challenging Job Opportunity for a C# Architect/ Developer |