lupa
lupa copied to clipboard
Print lua table representation of a table created from Python
I'm creating a simple table like this:
table = lua.table_from({'id': 0, 'name': 'name'})
Is it possible to print the lua table representation? I tried creating a lua function that would print() it but it only gives me the address of the table.
Seems more of a Lua problem than a Lupa problem.
I agree that _LuaTable could benefit from a nicer __repr__() implementation, though. As could some other objects like numbers. PR welcome that makes it return something like LuaTable({…}) and LuaNumber(123.4). Tests go into lupa.tests.test.