i have a large collection of python objects, each of which contains an integer 6-tuple as part of its data payload. what i need to be able to do is select only those objects which meet a simple tuple element wildcard matching criterion. e.g. given the following python objects:
object A includes tuple (1,2,3,4,5,6) object B includes tuple (1,4,4,4,11,1) object C includes tuple (1,3,9,1,1,1) all tuples are unique. for what it's worth, the values in each field are independent of the other fields and range from 1 to 14. although 'large', my collection is sparse cf. the 14^6 possible tuples. i want to search on *one only* tuple field/value. if my search criterion is (*,*,*,4,*,*), then i want to find object A and object B. if (1,*,*,*,*,*), i want to find objects A, B, and C, etc. i will only ever specify an integer match for one tuple field. i can think of some naive approaches, but is there an elegant way to do this? -- http://mail.python.org/mailman/listinfo/python-list