DB-API 2.0

Stefan Schwarzer s.schwarzer at ndh.net
Mon Apr 22 06:14:57 EDT 2002


Hello Piotr

"Piotr Czabañski" wrote:
> 1.
>     Fetch all (remaining) rows of a query result, returning them as a
> sequence of sequences (e.g. a list of tuples).

If I understand correctly you would use

conn = ...
cursor = conn.cursor()
cursor.execute(...)
...
more_items = cursor.fetchall()

>     J think the proper result would be a list of lists - specilally for
> people working with wxPython.

I consider it sensible that the inner structure is a tuple because it
represents a "row" from a query that should probably not be modified
(modifying would seem unintuitive to me).

Stefan



More information about the Python-list mailing list