Steve Holden <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]:
> 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. -- http://mail.python.org/mailman/listinfo/python-list