标签:font layer __name__ http span es2017 john compose lis
class NamedList(list):
def __init__(self, a_name):
list.__init__([])
self.name = a_name
if __name__ == ‘__main__‘:
johnny = NamedList(‘John Paul Jones‘)
print(johnny)
print(type(johnny))
print(dir(johnny))
johnny.append(‘Bass Player‘)
johnny.extend([‘Composer‘, ‘Arranger‘, ‘Musician‘])
print(johnny)
print(johnny.name)
标签:font layer __name__ http span es2017 john compose lis
原文地址:http://www.cnblogs.com/sammy1989/p/7560417.html