I have found that being able to place arbitrary constraints on the way my programs store things in (seemingly simple) data structures has been very, very powerful.
I should have been more specific when mentioning self-modifying data structures and Lua metatables in the same post.
Consider: it is possible for a table to be its own metatable, and for that table to contain (pointers to) some functions that govern storing data in the table. For the non-Lua reader, these tied-to-an-event-on-a-table functions are called table-access metamethods [0], and they allow for some dangerous shenanigans.
If these particular metamethods knew how to add to, rearrange, or delete from the set of callable functions already stored in the table, the subsequent layout and contents of the table could change in a non-deterministic way.
Something that looks like a simple assignment/update (__newindex/__index, insert/update, or your favorite pair of terms)
t[0] = "command phrase"
x = t[0]
could trigger wholesale reorganization of the table, including deletion or addition of new metamethods.[0] "Programming in Lua 1ed (Chapter 13. Metatables and Metamethods, 13.4 – Table-Access Metamethods)" http://www.lua.org/pil/13.4.html
edit: incomplete example
The metatable is more general and conceptually simpler. It doesn't have to be the "class" of an "object", it can implement other patterns to OO without feeling weird, because the assumption that metatable is "Object Oriented" just isn't there.
Do you have python beginners touching metaclasses? I doubt it. Do you have lua beginners touching metatables? Certainly yes.
Imagine if each Python object had one field that stored all the __blah hooks, and objects could share those. It's actually more powerful than that, but it's a good start.
[0] http://docs.python.org/reference/datamodel.html#object.__get...
>>> class A(object):
... def __getattribute__(self, key):
... try: return object.__getattribute__(self, key)
... except AttributeError: return lambda: 12
...
>>> a = A()
>>> a.asdf
<function <lambda> at 0x7fbb8fb6f848>
>>> a.asdf()
12