New submission from Erlend E. Aasland <erlend.aasl...@innova.no>:

See also bpo-45040

Since sqlite3_finalize() will pass on any error message set by sqlite3_step(), 
we can greatly simplify SQLite C API usage and error handling in 
sqlite3.Cursor.executescript(), thus reducing the number of times we 
save/restore thread state, and also simplifying error handling greatly.

We can also "inline" the commit before the main loop using the SQLite API 
directly, instead of calling self.commit()

Diffstat for the proposed patch:
1 file changed, 25 insertions(+), 42 deletions(-)

----------
components: Extension Modules
messages: 400505
nosy: erlendaasland
priority: low
severity: normal
status: open
title: [sqlite3] simplify executescript()
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45041>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to