Discuss / Python / 写了一个类的方法 哎 写麻烦了

写了一个类的方法 哎 写麻烦了

Topic source

念念Bber

#1 Created at ... [Delete] [Delete and Lock User]

class Student(object):

    count =0

    def __init__(self, name):

        self.name = name

        self.count_add()

    def count_add(self):

        Student.count=Student.count+1

        #self.count=self.count+1


  • 1

Reply