实在不理解def __init__(self, *args): self.names = args这两句是什么意思?self.names怎么就等于args了?还有,怎么name后面还加了一个s啊,这个是固定的属性吗?
class Students(object):
def __init__(self, *args):
self.names = args
def __len__(self):
return len(self.names)
class Students(object):
def __init__(self, *args):
self.names = args
def __len__(self):
return len(self.names)
2016-09-08
举报