Hi Everybody,
I am wondering about a better approach to doing this:
for obj in groups:
rVs = rVs + Event.objects.get(group=obj)
rVs.sort()
Instead what I'm looking for is to have a construct that would expand out to this:
rVs = Event.objects.get(group=groups[0]) | Event.objects.get(group=groups[1]) \
| ... | Event.objects.get(group=groups[n-1]) | Event.objects.get(group=groups[n])
I don't know if this is even possible. I have looked at the built in map function as well as
some of the itertools functions, but nothing seems to fit the bill. Is this even possible and
if so, how?
Thanks in advance!
-Tino
_______________________________________________
Tutor maillist -
Tutor@...
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor