Could you explain what you can accomplish with Lua metatables that you can't do with python __eg__ methods? I've only seen them used as a way to implement operator overloading.
In addition to everything a python class can do, you can also use setmetatable() to modify the metatable of a table at runtime. A metatable is also just a table so you don't have to assign it to designated "metatables". You can for example even set the metatable of a table to itself.
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.
__index and __newindex are the key ones - effectively equivalent to method_missing in Ruby. __index gets called if you try to read a non-existent key, and __newindex gets called if you try to write to a non-existing key. You can use these methods to implement inheritance, proxies, getters/setters, all sorts of stuff.
Yes, but in Python, you set them on every object. In Lua, you can set them once (in a prototype) and have each table share them (and possibly other methods, or a reference to another when lookup fails there). This makes certain behaviors (e.g. implementing your on object system) cheap and straightforward that would be impractical in Python.
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.
I'm not that familiar with Python, but can you use __getattribute__ to provide methods as well? Using __index is the way you typically implement inheritance in Lua.
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.