[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Penlight - Calling the constructor of a parent class
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 3 Jan 2013 10:44:37 +0200
On Thu, Jan 3, 2013 at 10:25 AM, Xavier Wang <firstname.lastname@example.org> wrote:
> what about this? make a new function named super:
OK, so self._base resolves to the object's base class, that's fine.
But it doesn't point to the object
obj:m(x) is just short for obj.m(obj,x), using convenient
assumption that the method is looked up on obj and also called on obj.
It's hard to change the meaning of obj.m without fooling with its
metatable, or doing nasty things like actually poking the method into