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: Dead code in datetime module
Type: resource usage Stage: resolved
Components: Extension Modules Versions: Python 3.1, Python 3.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: belopolsky Nosy List: belopolsky, mark.dickinson
Priority: normal Keywords: easy, patch

Created on 2010-07-04 03:39 by belopolsky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue9152.diff belopolsky, 2010-07-04 03:47
Messages (3)
msg109203 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-04 03:39
Apparently introduced by a wholesale elimination of PyString_ in r57374, the else clause in the following snippet from call_tzname is redundant:



        if (!PyUnicode_Check(result)) {
            PyErr_Format(PyExc_TypeError, "tzinfo.tzname() must "
                         "return None or a string, not '%s'",
                         Py_TYPE(result)->tp_name);
            Py_DECREF(result);
            result = NULL;
        }
        else if (!PyUnicode_Check(result)) {
            PyObject *temp = PyUnicode_FromObject(result);
            Py_DECREF(result);
            result = temp;
        }
msg109232 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-04 16:29
Committed in r82533.
msg109235 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-07-04 16:39
Merged in 3.1 in r82536.
History
Date User Action Args
2022-04-11 14:57:03adminsetgithub: 53398
2010-07-04 16:39:14belopolskysetstage: commit review -> resolved
messages: + msg109235
versions: + Python 3.1
2010-07-04 16:29:23belopolskysetstatus: open -> closed

messages: + msg109232
2010-07-04 03:47:15belopolskysetfiles: + issue9152.diff

nosy: + mark.dickinson
keywords: + patch
resolution: accepted
stage: commit review
2010-07-04 03:39:23belopolskycreate