#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2009 Doug Hellmann All rights reserved. # """ """ #end_pymotw_header import collections with_class = collections.namedtuple('Person', 'name class age gender', rename=True) print with_class._fields two_ages = collections.namedtuple('Person', 'name age gender age', rename=True) print two_ages._fields