Python TypeError: 'str' object is not callable for class

后端 未结 4 496
情话喂你
情话喂你 2021-01-12 11:14

Please help me understand this. I created a really simple program to try to understand classes.

class One(object):
    def __init__(self, class2):
        s         


        
4条回答
  •  伪装坚强ぢ
    2021-01-12 11:59

    You have both a variable and a function called "name" in Two. Name one of them differently and it should work.

提交回复
热议问题