Alex Henrie added the comment:
Hi Victor, just so we're all on the same page, removing the line does not
trigger a compiler warning. The comment on this line is misleading.
--
___
Python tracker
<https://bugs.python.org/is
Change by Alex Henrie :
--
keywords: +patch
pull_requests: +17682
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18305
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Henrie :
pysqlite_cursor_executescript currently has the following while loop:
/* execute statement, and ignore results of SELECT statements */
rc = SQLITE_ROW;
while (rc == SQLITE_ROW) {
rc = pysqlite_step(statement, self->connection);
Alex Henrie added the comment:
Sorry about that, I didn't notice that GCC's -Wall option emits a warning about
this. I just added the extra sets of parentheses.
--
___
Python tracker
<https://bugs.python.o
Alex Henrie added the comment:
You're right, that's even better. I forgot that the equals operator also
returns the variable's new value. I just updated my pull request :-)
--
___
Python tracker
<https://bugs.pyt
Change by Alex Henrie :
--
keywords: +patch
pull_requests: +17646
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18271
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Henrie :
The function pysqlite_cursor_executescript defines a variable called
script_str, initializes it to NULL, and calls Py_XDECREF on it. However, this
variable has been unused since August 2007:
https://github.com/python/cpython/commit
Change by Alex Henrie :
--
keywords: +patch
pull_requests: +17645
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18270
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Henrie :
pysqlite_cursor_fetchall currently has the following bit of code:
/* just make sure we enter the loop */
row = (PyObject*)Py_None;
while (row) {
row = pysqlite_cursor_iternext(self);
if (row) {
PyList_Append(list, row
Change by Alex Henrie :
--
keywords: +patch
pull_requests: +17644
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18267
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Henrie :
Modules/_sqlite/cursor.c currently has the following variable declaration:
static char *kwlist[] = {"size", NULL, NULL};
The second null terminator is unnecessary and detrimental in that it makes the
code harder to read and understand.
Modul
Change by Alex Henrie :
--
keywords: +patch
pull_requests: +17363
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17953
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Henrie :
The parsetok function currently contains the following code:
if (!growable_comment_array_init(&type_ignores, 10)) {
err_ret->error = E_NOMEM;
PyTokenizer_Free(tok);
return NULL;
}
if ((ps = PyParser_New(g, start))
Change by Alex Henrie :
--
keywords: +patch
pull_requests: +17328
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17916
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Henrie :
The function _ssl__SSLContext_load_verify_locations_impl currently contains the
following code:
if (r != 1) {
ok = 0;
if (errno != 0) {
ERR_clear_error();
PyErr_SetFromErrno(PyExc_OSError
Change by Alex Henrie :
--
keywords: +patch
pull_requests: +17327
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17915
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Henrie :
The function pattern_subx currently sets the variable b to charsize, but that
variable is reset to STATE_OFFSET(&state, state.start) before it is ever used.
--
components: Regular Expressions
messages: 359653
nosy: alex.henrie, ezio.mel
Change by Alex Henrie :
--
keywords: +patch
pull_requests: +17326
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17914
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Henrie :
config_init_module_search_paths currently has the following code:
const wchar_t *p = sys_path;
while (1) {
p = wcschr(sys_path, delim);
The first assignment to p is unnecessary because it is immediately overwritten.
Victor Stinner suggested
Change by Alex Henrie :
--
keywords: +patch
pull_requests: +17319
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17908
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Henrie :
The function _sharedexception_bind currently has the following bit of code in
two places:
if (PyErr_ExceptionMatches(PyExc_MemoryError)) {
failure = "out of memory copying exception type name";
}
failure = "unable to
Change by Alex Henrie :
--
type: -> performance
___
Python tracker
<https://bugs.python.org/issue39261>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Alex Henrie :
--
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue39261>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Henrie :
--
keywords: +patch
pull_requests: +17318
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17907
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Henrie :
The function pyinit_config currently contains the following line:
config = &tstate->interp->config;
However, the config variable is not used after that point.
Victor Stinner has confirmed that this assignment is unnecessary:
https://github.
Alex Henrie added the comment:
Thank you!
--
___
Python tracker
<https://bugs.python.org/issue39237>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Henrie :
--
keywords: +patch
pull_requests: +17293
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17877
___
Python tracker
<https://bugs.python.org/issu
New submission from Alex Henrie :
The delta_new function in _datetimemodule.c currently contains the following
code:
/* Round to nearest whole # of us, and add into x. */
double whole_us = round(leftover_us);
int x_is_odd;
PyObject *temp;
whole_us = round(leftover_us
Change by Alex Henrie :
--
keywords: +patch
pull_requests: +9081
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34889>
___
___
Py
New submission from Alex Henrie :
When serializing a single integer, int.to_bytes and int.from_bytes are more
efficient alternatives to struct.pack and struct.unpack. However, struct.pack
and struct.unpack currently have the advantage that the byteorder does not have
to be specified (because
30 matches
Mail list logo