[DB-SIG] will these existing API warts be gone in DB-API 3.0?

Dittmar, Daniel daniel.dittmar at sap.com
Wed Aug 6 17:14:51 EDT 2003

> Upon my switch from kinterbasdb to MySQLdb, two
> warts of the Python DB-API immediately made themselves
> known.  Different prepared statement syntax and
> non-standard ways of getting dictionary-indexed
> results throw a big monkey wrench into portability.
> This is most unPythonic.  Are there plans to fix
> this in future versions of the DB-API spec?

A change seems to be very unlikely. The topic of parameterstyles appears quite often, but no driver author volunteered to tokenize the SQL command to detect placeholders that are not native to the underlying database or library. There isn't even an agreement whether parameters are to be addressed by position or by name and whether parameters are passed via list/dictionary or varargs/keyword args.

As with dictionary-index results, there are several libraries available and it is quite easy to use them as a filter to an existing cursor. So there is no need to make the DB API spec more complicated.


Daniel Dittmar
SAP DB, SAP Labs Berlin
daniel.dittmar at sap.com

More information about the DB-SIG mailing list