In 79 ids object_id for object_id tag_lis in groupby items lambda obje

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
In [79]: ids = [object_id for object_id, tag_lis in groupby(items, lambda i: i.object_id) if len(tag_lis) == len(tags)]
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/offline/Development/django/webby/<ipython console> in <module>()
TypeError: object of type 'itertools._grouper' has no len()
In [80]: tag_lis
Out[80]: <itertools._grouper object at 0x8f1e2ec>
In [81]: ids = [object_id for object_id, tag_list\
in groupby(items, lambda i: i.object_id) if len(tag_list) == len(tags)]
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/offline/Development/django/webby/<ipython console> in <module>()
TypeError: object of type 'itertools._grouper' has no len()