This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PyUnicode_IsIdentifier has two if/thens that can be combined
Type: Stage: resolved
Components: Interpreter Core Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, petdance
Priority: normal Keywords: patch

Created on 2020-02-19 05:14 by petdance, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 18565 merged petdance, 2020-02-20 02:22
Messages (2)
msg362250 - (view) Author: Andy Lester (petdance) * Date: 2020-02-19 05:14
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];
    }
msg362379 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2020-02-21 04:52
New changeset 933fc53f3f9c64ffa703b1f23a93bec560faea57 by Andy Lester in branch 'master':
closes bpo-39684: Combine two if/thens and squash uninit var warning. (GH-18565)
https://github.com/python/cpython/commit/933fc53f3f9c64ffa703b1f23a93bec560faea57
History
Date User Action Args
2022-04-11 14:59:26adminsetgithub: 83865
2021-01-11 23:02:52iritkatriellinkissue39690 superseder
2020-02-21 04:52:00benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg362379

resolution: fixed
stage: patch review -> resolved
2020-02-20 02:37:19petdancesetpull_requests: - pull_request17937
2020-02-20 02:22:41petdancesetpull_requests: + pull_request17947
2020-02-19 05:21:35petdancesetkeywords: + patch
stage: patch review
pull_requests: + pull_request17937
2020-02-19 05:14:59petdancecreate