<reponame>axetang/AxePython<filename>PyMOTW/source/collections/collections_namedtuple_immutable.py<gh_stars>1-10
#!/usr/bin/env python3
# encoding: utf-8
#
# Copyright (c) 2009 <NAME> All rights reserved.
#
"""
"""

#end_pymotw_header
import collections

Person = collections.namedtuple('Person', 'name age')

pat = Person(name='Pat', age=12)
print('\nRepresentation:', pat)

pat.age = 21

#!/usr/bin/env python3
# encoding: utf-8
#
# Copyright (c) 2009 <NAME> All rights reserved.
#
"""
"""

#end_pymotw_header
import collections

Person = collections.namedtuple('Person', 'name age')

pat = Person(name='Pat', age=12)
print('\nRepresentation:', pat)

pat.age = 21
#!/usr/bin/env python3 # encoding: utf-8 # # Copyright (c) 2009 <NAME> All rights reserved. # #end_pymotw_header