[New-bugs-announce] [issue43267] [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter()

Erlend Egeberg Aasland report at bugs.python.org
Fri Feb 19 05:45:36 EST 2021

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

The type checks at the start of pysqlite_statement_bind_parameter() are redundant:
We first check for exact types (*_CheckExact()), and then we check again for exact or subtyped versions (*_Check()).

(Adding to the redundantness: the result of this if..else "switch statement" is then reused as the expression in the subsequent switch statement.)

Suggesting to remove the redundant checks and merge the two switch statements.

components: Library (Lib)
messages: 387302
nosy: berker.peksag, erlendaasland
priority: normal
severity: normal
status: open
title: [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter()
type: enhancement
versions: Python 3.10

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list