In message <mailman.2303.1246287643.8015.python-l...@python.org>, Gabriel 
Genellina wrote:

> The fact that it's the same character used for formatting strings with the
> % operator is an unfortunate coincidence (or a very bad choice, I don't
> know).

That's not the problem. The problem is that MySQLdb IS indeed using Python 
format substitution to do its argument substitution. Python expects the 
value for "%d" to be an integer. But MySQLdb has already converted all the 
argument values to strings. Hence the error.

If MySQLdb were doing its own parsing of the format string, it could produce 
a more meaningful error message when it sees "%d" (e.g. "only %s 
substitutions allowed").

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to