class Room:
tag = 1
def __init__(self, name, owner, width, length, heigh):
self.name = name
self.owner = owner
self.width = width
self.length = length
self.heigh = heigh
def test(self):
print('from test', self.name)
@classmethod
def tell_info(cls, x):
print(cls)
print('--》', cls.tag, x)
Room.tell_info(10)
7_20 day 25 13min类方法
猜你喜欢
转载自www.cnblogs.com/yikedashuyikexiaocao/p/9339502.html
今日推荐
周排行