New submission from Alexander Belopolsky <[email protected]>:
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;
}
----------
assignee: belopolsky
components: Extension Modules
keywords: easy
messages: 109203
nosy: belopolsky
priority: normal
severity: normal
status: open
title: Dead code in datetime module
type: resource usage
versions: Python 3.2
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue9152>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com