Python DB API - commit() v. execute("commit transaction")?

Jon Ribbens jon+usenet at unequivocal.eu
Wed May 31 10:10:43 EDT 2017


On 2017-05-31, DFS <nospam at dfs.com> wrote:
> On 5/31/2017 6:26 AM, Jon Ribbens wrote:
>> Yes, this is indeed a problem with DB-API - you have to keep *two*
>> objects around all the time (the connection and the cursor) and pass
>> them to functions, etc, when in any sensible system as used by all
>> other languages you would only need to pass the connection.
>
> You only need to pass the cursor.

... unless you want to call .commit() or .rollback().
Which is where we came in.



More information about the Python-list mailing list