Python3 Enum with instance method as values

后端 未结 0 1931
伪装坚强ぢ
伪装坚强ぢ 2021-01-07 20:15

For example I have a class to define some operations that can be done:

class MathOps(a,b):
    def add(self):
        return self.a + self.b
    def subtract(         


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