Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

There are three calls of pysqlite_statement_reset() in 
_pysqlite_query_execute(). And all three of them can be called with the same 
statement object. But repeated calls are no-ops because 
pysqlite_statement_reset() clears flag in_use and calls sqlite3_reset() only if 
it was set before. So additional call of pysqlite_statement_reset() does not 
harm. You can call it as many times as you want. On other hand removing it can 
introduce race condition.

Maybe the code could be rewritten in more explicit way and call 
pysqlite_statement_reset() only when it is necessary, but for now I don't think 
that just removing one call will make the code better.

----------

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

Reply via email to