Lie Hetland book: Beginning Python..
Vittorio
renmybiru at libero.it
Tue Nov 8 04:31:44 EST 2005
Steve Holden <steve at holdenweb.com> wrote in
news:mailman.234.1131390819.18701.python-list at python.org:
> No, you actually did quite a creditable piece of debugging. The DB-API
> specifications allow database modules to substitute parameters into
> SQL commands in a number of different ways, and they are supposed to
> indicate the technique they use by setting a module variable
> "paramstyle" to one of five possible values.
>
> Magnus' original code was written to use a different (but valid)
> paramstyle, so I'm guessing that his sqlite module and your sqlite2
> simply use different paramstyles. Whether that's because a change was
> made in developing the pysqlite code or because pysqlite and pysqlite2
> come from different developers I couldn't say, but you have nailed the
> problem. Well done!
Thanks Steve for your encouragement.
Actually, subsequently to my posting, I had realised that the point was
in the different version of the Pysqlite interface: in fact I found many
other pieces of code which were affected the same way, and each of them
made use of "import pysqlite".
Nonetheless, I was unable to find any documentation about such a
different behaviour between Pysqlite and Pysqlite2; from my beginner
point of view the Pysqlite (Magnus' version) paramstyle looks a better
and more pythonic choice and I don't grasp the Pysqlite2 developers'
intentions deviating from that way.
I would be very grateful if someone would cast a light over
Pysqlite/Pysqlite2 discrepancies.
More information about the Python-list
mailing list