Both functions don't expand tables used as keys/values. `dir(table)` will list `key = value` pairs, but non-recursively. `dir2(table)` will only list the keys. These functions return nothing and are to be used only interactively.