Comment 3 for bug 497143

Revision history for this message
Niels Kjøller Hansen (kjoller) wrote :

Sorry to be spamming this bug, but it seems to me that the fixed branch still requires you to pass a dictionary as an option, as in

db.execute_view("view_name","design_doc",{ 'group':True })

If so, this does not seem very pythonic to me. I am not necessarily right, since I'm not that much of a hacker, but could it not be done by defining the function like this instead? :

def execute_view(self, view_name, design_doc=DEFAULT_DESIGN_DOCUMENT, **paramdict):

In my tests it works fine with 0, 1 or more paramters, and you don't even need to check if paramdict is empty, as it will automagically generate an empty dict.