一些代码实践总结整理

class Yep :
    member = 999
    def init(self):
        self.member += 1
    def getMember(self):
        return self.member
    def getYepMember(self):
        return Yep.member

y1 = Yep()
y2 = Yep()
y1.init()

print(y1.member)
print(y1.getMember())
print(y1.getYepMember())
print("========================")
print(y2.member)
print(y2.getMember())
print(y2.getYepMember())


#输出:
1000
1000
999
========================
999
999
999

 

上一篇:mysql索引的讲解和应用,必会


下一篇:Eclipse中快捷键的使用