Python 3.9 - Passing Method When Initialising Static Variable

后端 未结 0 677
悲哀的现实
悲哀的现实 2020-12-16 14:19

I was hoping to be able to do this:

class C:
    def __init__(self, foo:Callable):
        self._foo = foo

class D:

          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题