[DB-SIG] Result Set Inconsistencies
Orr, Steve
sorr at rightnow.com
Fri Jul 18 12:09:19 EDT 2003
Regarging:
> No need to complicate things: It's easy enough to convert any Python
> sequence type into any other type you may want.
Hmmm... Well that's my point. If an API consistently returns the same sequence type then it's less complicated. I guess "complication" depends on your perspective. ;-)
-----Original Message-----
From: Marc-Andre Lemburg [mailto:mal at lemburg.com]
Sent: Thursday, July 17, 2003 3:50 AM
To: db-sig at python.org
Subject: Re: [DB-SIG] Result Set Inconsistencies
Marcos Sánchez Provencio wrote:
> Kevin Jacobs wrote:
>
>> On Wed, 16 Jul 2003, Orr, Steve wrote:
>> The API authors were very careful about _not_ specifying what kinds
>> of sequence type. The fact that you want to fill in some extra
>> details implies that your needs differ from those that the authors
>> intended. This is not to
>> say that the spec is perfect, but this flexibility has been
>> appreciated by
>> driver authors and has placed no undue burden on application writers.
>>
>
> Maybe all we need is to narrow the spec about this point. We could say
> the resultset is list-compatible and offer suggested improvements (such
> as named columns, iterators, etc.). Plus metadata to know what level of
> improvements we have (a-la-paramstyle).
>
> ¿Everybody happy about that?
No need to complicate things: It's easy enough to convert any Python sequence type into any other type you may want.
In reality, you rarely care whether the return value from .fetchall() or .fetchmany() is a list, tuple, user defined sequence type, etc. because you're usually processing the data using iteration and/or indexing.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Software directly from the Source (#1, Jul 17 2003)
>>> Python/Zope Products & Consulting ... http://www.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2003-07-01: Released mxODBC.Zope.DA for FreeBSD 1.0.6 beta 1
_______________________________________________
DB-SIG maillist - DB-SIG at python.org http://mail.python.org/mailman/listinfo/db-sig
More information about the DB-SIG
mailing list