Simplified getAttributesId()

This commit is contained in:
Salvo 'LtWorf' Tomaselli 2015-06-01 08:55:11 +02:00
parent 496a5c19d1
commit 1f7983309b

View File

@ -550,9 +550,4 @@ class header (object):
def getAttributesId(self, param):
'''Returns a list with numeric index corresponding to field's name'''
res = []
for i in param:
for j in range(len(self.attributes)):
if i == self.attributes[j]:
res.append(j)
return res
return [self.attributes.index(i) for i in param]