DB API specification of .rowcount and/or execute

Gerhard Häring gh at ghaering.de
Mon Nov 14 10:41:52 EST 2005


andychambers2002 at yahoo.co.uk wrote:
> Hi,
> 
> Should execute() be allowed to execute multiple operations? [...]

You best ask such questions on the DB-SIG. I say "no" and I think most 
people there will agree.

Most DB-API modules will accept multiple statements, but that's an 
implementation artifact, and not intended by the DB-API.

FWIW I specifically implemented a check in pysqlite that will raise a 
Warning if you use multiple statements in execute(many) and provided a 
nonstandard executescript() method for those who really want to execute 
multiple statements.

-- Gerhard




More information about the Python-list mailing list