[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Suggestion: table.insert with multiple arguments (was Re: Definition of table.insert)
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 10 Jan 2011 08:37:26 +0200
On Mon, Jan 10, 2011 at 5:06 AM, GrayFace <sergroj@mail.ru> wrote:
> table.insert(table, pos, ...)
> Inserts values '...' at position 'pos' in 'table', shifting up other
> elements to open space, if necessary.
The problem is that it's easy to make a multiple insertion by mistake.
It's common for functions to return multiple values (e.g. string.gsub)
and unless you're awake, you end up with extra nonsense in your list,
due to the arg expansion for the last argument to a function.
steve d.