Hi,
The "fetchall()" command returns a list. Lists are mutable objects in python.
Could a valid implementation return the same list object (with different
contents) for multiple calls to fetchall() (with potentially different
preceding execute queries)?
e.g.
cursor.execute( """SELECT * FROM table1;""" );
result = cursor.fetchall();
print result;
cursor.execute("""SELECT * FROM table2;""" );
junk = cursor.fetchall();
print result;
Is it possible, in a valid implementation, for the two print statements to
generate different output (which would be the case if, for example, the
fetchall method used an internal list which is a member variable of the cursor
object in its return)?
It seems to me that it is important for implementors and users of a DBI to
understand the implications of this.
Thanks,
Stefan
--
Dr. Stefan C. Kremer
Dept. of Computing & Information Science
[email protected] * 519-824-4120x58913
_______________________________________________
DB-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/db-sig