>>> class A:
... def method(self):
... print("A")
...
>>> class B:
... def method(self):
... print ("B")
...
>>> a = A()
>>> a.__class__
<class '__main__.A'>
>>> a.__class__ = B
>>> a.method()
B
"Aaaaaaaaa!" goes the interpreter implementor.It's not the raw syntax that is hard, it's the mutability of everything, you know, a user gets an instance of something, adds an overload of the __add__ operator to just that instance which then proceeds to change the class of the other element of the addition operation... sure, it doesn't happen often but it happens often enough you can't just ignore it, unfortunately, or what you've implemented isn't Python anymore.
1. Come up with an inefficient but exact modelling of the semantics in pure Lua using tables and metamethods. I think I can write metamethods showing exactly the behaviour you describe.
2.Come up with an efficient implementation of python_class userdata?
The problem you describe is the problem of really understanding what's going on, not a deficit in Lua's ability to model it.
Which Python constructs in particular did you think were tricky? I had thought a bit about the special case of modelling Python comprehensions and decided that they translated nicely, but I might be deluding myself since I implemented nothing.
[1]: http://members.chello.nl/~w.couwenberg/lgmp.htm