On Mon, 16 Aug 2010 20:40:52 +0200, Frederic Rentsch wrote: > How about > >>>> [obj for obj in dataList if obj.number == 100] > > That should create a list of all objects whose .number is 100. No need > to cycle through a loop.
What do you think the list comprehension does, if not cycle through a loop? -- Steven -- http://mail.python.org/mailman/listinfo/python-list