lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>     function table.proto (t)
>         local tp = {}
>         for k in pairs(t) do
>             tp[k] = nil
>         end

In principle, this loop has not effect because the table is empty and will
remain empty after the loop. In the current implementation it does have the
side effect that the keys are temporarily created in tp. Are you counting
on this behavior??