Re: Sybase module -- input sought

Alexander G. Smith (ags@uncompaghre.jax.org)
Tue, 10 May 94 17:18:26 GMT

In article <9405100754.AA10880=guido@voorn.cwi.nl> Guido.van.Rossum@cwi.nl writes:
>I don't know sybase, but in most databases the order of the columns
>is important as well. Python dictionaries don't preserve the order
>of the keys (they are in a random order determined by the hash function
>used for lookup). Presuming people will be getting many different
>rows from the same database, the most efficient thing to do would bne
>to return just a tuple containing the row's values, with a special call
>to return a tuple containing the column names.
>
>--Guido

Exactly, and with a dictionary they don't have to worry about the
order of columns -- if row['title'] always returns the value of the title
column, it doesn't matter what order the columns are in.

Alex