On Fri, Aug 1, 2014 at 2:58 PM, Rémy Hubscher <
hubsch...@gmail.com> wrote:
> models = []
> for principal in principals:
> models += [d.value for d in views.models(self._db)[principal].rows]
>
> How can I call directly the views using keys=principals?
>
> Something equivalent to:
>
> models = [d.value for d in views.models(self._db)[*principals].rows]
You can generally pass a keys keyword argument to view, so I think
something like this should work:
models = [d.value for d in views.models(self._db, keys=principals).rows
Cheers,
Dirkjan