Am 03.01.2019 um 22:58 schrieb Christoph Zwerschke:
Am 03.01.2019 um 22:52 schrieb Justin Pryzby:
>>
One thought ; should "name" be an kwarg with default name='' ?
Yes, that's a good idea. The parameters would then go in opposite order
to the underlying libpq method, but it would be more pythonic.
So I have now made the name optional. But I'm not quite sure any more if
we really want it that way. There are two drawbacks:
1. The order of params is now different from the underlying C function
where the name comes first which could be confusing.
2. People might be tempted to leave out the name when calling
query_formatted() with arguments, but then the first argument would be
interpreted as the name. This may cause unexpected errors.
So maybe forcing the name to always be the first, non-optional parameter
might be less confusing for users.
What do you think? Revert or leave it like that?
-- Christoph
_______________________________________________
PyGreSQL mailing list
PyGreSQL@Vex.Net
https://mail.vex.net/mailman/listinfo/pygresql