I have just noticed that Scribunto converts keys of template arguments like 0=foo, -1=bar or -2=baz into numbers when accessed via frame.args. This seems unexpected, as there is no way to have positional parameters with keys of 0, -1 or -2.
We should probably fix this to only allow keys that could possibly be for positional parameters to be converted to numbers. I don't know if changing the current behaviour would break any existing modules, however.
This came up because of my message here where I suggested that you could use type(key) == 'number' to check whether a parameter was positional or not. It turns out that that is not actually strictly true. :)
I have some example code in my module sandbox:
local p = {} function p.main(frame) local ret = '' for k, v in pairs(frame.args) do ret = ret .. string.format('key: %s; key type: %s\n', tostring(k), type(k)) end return ret end return p
Calling this with {{#invoke:User:Mr. Stradivarius/sandbox|main|-1=foo}} produces key: -1; key type: number.