July 27, 2021
11:22 p.m.
On Wed, Jul 28, 2021 at 3:56 PM Yua <uncha21@163.com> wrote:
Thank you for bringing that to my attention!
I think maybe can the interpreter decide whether __class__ etc. should be added to the environment with regard to how the function is called?
The interpreter does not provide __class__ etc. for plain placement() calls, but provide them at calls like child().foo() - when the callee function is named as a class method. Dynamically.
No, because it can't know WHICH class it should be referencing. The entire point of the name __class__ is that it refers to the class being defined, so it has to be added at compilation time. ChrisA