[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Moving key & values from one table to another
- From: Chris <coderight@...>
- Date: Wed, 1 Mar 2006 16:17:58 -0500
Are there any tricks to insert all the keys and values of one table into another?
For example:
t = {}
t.a = "a"
t.b = "b"
t.c = "c"
u = { unpack(t), d="d", e="e" }
I know you can't use unpack except on numbered index values. Is
my only choice a table.foreach with an insert of each value from `t'
into `u'?
--
// Chris