変なこと言ってたらすみません...
クラスの継承のようなものを高階関数でするにはどう書けばいいのでしょうか?
python
1# -*- coding: utf-8 -*- 2 3class Product(object): 4 def __init__(self, width, height): 5 self.width = width 6 self.height = height 7 8 def product_1(self, depth): 9 return self.width * self.height * depth 10 11class Triangle(Product): 12 def product_2(self, hogehoge): 13 return (self.width * self.height) / hogehoge 14 15i = Triangle(3, 5) 16print(i.product_2(4))