Introspect calling object

前端 未结 4 1993
余生分开走
余生分开走 2020-12-15 21:17

How do I introspect A\'s instance from within b.func() (i.e. A\'s instance\'s self):

class A():
         


        
4条回答
  •  伪装坚强ぢ
    2020-12-15 21:53

    I agree with Benjamin - pass it to b.func() as an argument and don't introspect it!!!!

    If your life really depends on it, then I think you can deduce the answer from this answer.

提交回复
热议问题