[DB-SIG] spec: named parameters: clarification needed

M.-A. Lemburg mal@lemburg.com
Mon, 17 Feb 2003 23:34:30 +0100


Anthony Tuininga wrote:
> On Sun, 2003-02-16 at 03:05, M.-A. Lemburg wrote:
>>If you like this better, then I'd suggest to add a new method
>>to your implementation which implements this interface. The spec
>>is clear about passing only one object in to hold the parameters
>>for .execute() and as Stuart already explained fits in nicely
>>with .executemany().
> 
> Right. And using keyword arguments passes __ONE__ argument to the
> underlying function, but in a format that is __MUCH__ easier to read
> than any of the formats you suggested below. 

If you think it is so much easier to write, then nobody is stopping
you from implementing it this way. All I'm saying is that the DB API 2.0
specifies something different, so your interface is not in line with
it.

There's nothing much to argue here. If you want to stay in line
I'd suggest to either use a different method name or to tell
you users about the difference in interpretation.

Most serious apps have an abstraction layer between the application
code and the database interface anyway, so it is really not
necessary to get into heated discussions about this.

You should think of the DB API as a driver API specification not
an end-user interface.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Software directly from the Source  (#1, Feb 17 2003)
 >>> Python/Zope Products & Consulting ...         http://www.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
Python UK 2003, Oxford:                                     43 days left
EuroPython 2003, Charleroi, Belgium:                       127 days left