How do I define a constant list of namedtuples? I wish to define something like this in a module and use it throughout my code. I will then use filters on it when I'm only interested in ADULTS for example.
However, I dont want other coders to be able to corrupt this data, which they can do if I use a list. I realise that I could use a tuple but my understanding is that there is a de facto standard that tuples are used for heterogeneous data while I actually have homogeneous data:
http://jtauber.com/blog/2006/04/15/python_tuples_are_not_just_constant_lists/
If I have understood this article correctly.
human_map = [
Activity(ADULT, EATING, OFTEN, 5),
Activity(ADULT, SLEEPING, PERIODIC, 24),
Activity(BABY, CRYING, OFTEN, 1)]