[New-bugs-announce] [issue39684] PyUnicode_IsIdentifier has two if/thens that can be combined
Andy Lester
report at bugs.python.org
Wed Feb 19 00:14:59 EST 2020
New submission from Andy Lester <andy at petdance.com>:
These two code if/thens can be combined
if (ready) {
kind = PyUnicode_KIND(self);
data = PyUnicode_DATA(self);
}
else {
wstr = _PyUnicode_WSTR(self);
}
Py_UCS4 ch;
if (ready) {
ch = PyUnicode_READ(kind, data, 0);
}
else {
ch = wstr[0];
}
----------
components: Interpreter Core
messages: 362250
nosy: petdance
priority: normal
severity: normal
status: open
title: PyUnicode_IsIdentifier has two if/thens that can be combined
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39684>
_______________________________________
More information about the New-bugs-announce
mailing list