Nationalities = collections.namedtuple('Nationalities', ['Poland', 'France',
    'Germany'])
nat = Nationalities('PL', 'FR', 'DE')
print(nat.Poland)
print(nat.index(nat.Germany))
Преобразовать enum в int в python