Function as class atribute

后端 未结 0 1372
有刺的猬
有刺的猬 2021-01-04 08:45

I am writing a class where I would like to pass function as a class attribute and later use it, like that:

def fun1(x):
    return x+1

class A:
    def __ini         


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