Defining Setter/Getter for an unparented local variable: impossible?

前端 未结 4 1952
陌清茗
陌清茗 2020-12-25 10:54

There\'s a few previous questions on StackOverflow questioning how one goes about accessing local variables via the scope chain, like if you wanted to reference a local vari

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-25 11:09

    It looks like the answer is No. I have been searching for behavior like this for quite a while. I have not been able to come up with any passable solution. This SO question seems similar. Python has the nice locals keyword.

提交回复
热议问题