def do_render_group group pass def render_groups self lst def get_grou

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
def do_render_group(group):
pass
def render_groups(self, lst):
def get_group():
last = None
res = []
for obj in lst:
if obj.grp != last:
yield res
last, res = obj.grp, []
res.append(obj)
yield res
if lst:
map(do_render_group, get_group())