https://bugzilla.wikimedia.org/show_bug.cgi?id=66619

--- Comment #9 from Maarten Dammers <[email protected]> ---
"0" is a string. If I would have a dict and a list:

somedict = { "0" : "bla", "1" : "more bla" }
somelist = ["bla", "more bla"]

I would access the "bla with somedict["0"] ("0" is a string here) and in the
list I would do somelist[0] to access "bla.

>>> somedict = { "0" : "bla", "1" : "more bla" }
>>> somelist = ["bla", "more bla"]
>>> print somedict["0"]
bla
>>> print somelist["0"]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: list indices must be integers, not str
>>> print somelist[0]
bla
>>>

So if someone changed the output from a dict ("0") to list (0), that would
explain this error.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to