Last modified: 2014-03-19 11:15:28 UTC
Quoting from https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team#.270.27_key_in_Lua_tables "The most standard Lua tables are "sequence" where the key are natural numbers starting from 1, but Wikibase tables seem to have a key "0". It is a bit annoying. According to the documentation, "Many Lua functions operate only on sequences, and ignore non-positive-integer keys." For instance, the number of claims for a property, as given by #entity.claims.pXX is one less than expected. --Zolo (talk) 09:49, 19 September 2013 (UTC)"
Change 94909 had a related patch set uploaded by Jens Ohlig: (bug 54324) sequence in Lua should start with 1 https://gerrit.wikimedia.org/r/94909
Change 94909 abandoned by Jens Ohlig: (bug 54324) sequence in Lua should start with 1 Patch set 2: Reformatted Patch set 3: Oops, I meant to reformat it like this. Patch set 4: ... https://gerrit.wikimedia.org/r/94909
Change 96232 had a related patch set uploaded by Jens Ohlig: (Bug 54324) Sequences in Lua should start with 1 https://gerrit.wikimedia.org/r/96232
Change 96232 abandoned by Hoo man: (Bug 54324) [DON'T MERGE] Sequences in Lua should start with 1 Reason: Superseded by https://gerrit.wikimedia.org/r/106905 (which implements this behavior, but doesn't make it default) https://gerrit.wikimedia.org/r/96232
Change 107206 had a related patch set uploaded by Hoo man: Introduce mw.wikibase.entity Lua library https://gerrit.wikimedia.org/r/107206
The listed patch will introduce a new mw.wikibase method which does that right, but leave the old legacy interface in place.
Change 107206 merged by jenkins-bot: Introduce mw.wikibase.entity Lua library https://gerrit.wikimedia.org/r/107206
Fixed for the new Lua interface, the legacy one will stay in place for now