Re: Lua 5.2 - small enhancement for table.unpack
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Lua 5.2 - small enhancement for table.unpack
- From: Patrick Rapin <toupie300@...>
- Date: 2011年6月29日 11:20:46 +0200
> I'd much rather a change where table.pack just returns a table and length:
>
> function table.pack(...)
> return {...},select("#",...)
> end
The function table.pack could also set a metatable with then __len
metamethod returning the true length, since table.unpack already obey
__len metamethod.