[issue43294] [sqlite3] unused variables in Connection begin, commit, and rollback

Erlend Egeberg Aasland report at bugs.python.org
Mon Feb 22 05:06:47 EST 2021


New submission from Erlend Egeberg Aasland <erlend.aasland at innova.no>:

In Modules/_sqlite/connection.c:
pysqlite_connection_commit_impl(), pysqlite_connection_rollback_impl(), and _pysqlite_connection_begin() all call sqlite3_prepare_v2() with the fourth parameter (pzTail) set. This (output) parameter is never used, we can safely remove the tail variables, and just call sqlite3_prepare_v2() with NULL as the fourth parameter.


Also, there's a lot of code duplication here. A support function could help simplify this, but that's out of scope.

----------
components: Library (Lib)
messages: 387510
nosy: berker.peksag, erlendaasland, serhiy.storchaka
priority: normal
severity: normal
status: open
title: [sqlite3] unused variables in Connection begin, commit, and rollback
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43294>
_______________________________________


More information about the Python-bugs-list mailing list