On September 25, 2012, [email protected] wrote: > From: Nico Latzer <[email protected]> [...] > share a feeling, it might be more cleaner design to handover the > arguments packed as a tuple.
Optional arguments are already seen as a tuple, so it would be a small code change in pg.py. As a user, I'd find this a bit error-prone, especially in the case where there's only one argument. One answer to that is to accept both -- a tuple or list is treated as a list of positional arguments, a scalar is a positional argument on its own. > From: Christoph Zwerschke <[email protected]> [...] > Agree. This would also allow passing a list of tuples in which case > multiple queries would be executed for each tuple. That would be slightly more work :) I guess the idea here is to cycle on calls to PQexecParams() until we're out of arguments. My status is that I've applied my changes to the head revision, but the unit tests don't all pass. I need to go back and see if they pass without my changes (and add new test cases, I know I know). Unicode strings cause an exception, so I need to fix that. I likely won't get to this until the week-end, but I should submit a full patch next week. -- Patrick TJ McPhee <[email protected]> _______________________________________________ PyGreSQL mailing list [email protected] https://mail.vex.net/mailman/listinfo.cgi/pygresql
