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

后端 未结 4 525
情话喂你
情话喂你 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:52

    I would strongly suggest you get into the habit of carefully naming things. As you can see, even with very small pieces of code, you can get into trouble. You'll definitely want to read the Python style PEP very carefully. http://www.python.org/dev/peps/pep-0008/

提交回复
热议问题