In message <[EMAIL PROTECTED]>, Duncan Booth wrote: > Corrado Gioannini <[EMAIL PROTECTED]> wrote: > >> I often do things like this: >> >> sql = a_complex_select_sql % (id_foo, value_bar, ...) >> cursor.execute(sql) >> >> inside the body of a function (or a class method), where >> a_complex_select_sql is a string, containing several %s, %d ecc., >> that is defined globally (or somewhere else in the class). >> > I hope you have a good reason why you don't do: > > cursor.execute(a_complex_select_sql, (id_foo, value_bar, ...)) > > instead.
I use the above when I can, when I can't I fall back on <http://groups.google.co.nz/[EMAIL PROTECTED]>, <http://groups.google.co.nz/[EMAIL PROTECTED]>. -- http://mail.python.org/mailman/listinfo/python-list