Python初心者で質問があります..
次のようなクラス関数があります。
class Example(A):
def __init__(self, ID, name, products, itemlist):
A.__init__(self, itemID, name)
self.products = products
self.itemlist = itemlist
def get_items_list(self):
return self.itemlist
私が書いたと仮定します
Example('SomeID', 'Somename', products, [('a', 1), ('b', 1), ('c', 1)])
それから私がするとき
get_items_list()
私のコードが返されます
bound method Compound.get_items_str of SomeID, Somename, <__main__.Products object at 0x102d2e4d0>>
私が提供したアイテムリストの代わりに...
どんな答えでも大歓迎で、私の間違いの言い訳になります。