mirror of
https://github.com/python/cpython
synced 2024-09-24 11:19:17 +00:00
Marc-Andre Lemburg:
Doc strings can now be given as Unicode strings.
This commit is contained in:
parent
3c1bb8043f
commit
ec5b776998
|
@ -55,7 +55,7 @@ PyFunction_New(code, globals)
|
|||
consts = ((PyCodeObject *)code)->co_consts;
|
||||
if (PyTuple_Size(consts) >= 1) {
|
||||
doc = PyTuple_GetItem(consts, 0);
|
||||
if (!PyString_Check(doc))
|
||||
if (!PyString_Check(doc) && !PyUnicode_Check(doc))
|
||||
doc = Py_None;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue