mirror of https://github.com/python/cpython
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;
|
consts = ((PyCodeObject *)code)->co_consts;
|
||||||
if (PyTuple_Size(consts) >= 1) {
|
if (PyTuple_Size(consts) >= 1) {
|
||||||
doc = PyTuple_GetItem(consts, 0);
|
doc = PyTuple_GetItem(consts, 0);
|
||||||
if (!PyString_Check(doc))
|
if (!PyString_Check(doc) && !PyUnicode_Check(doc))
|
||||||
doc = Py_None;
|
doc = Py_None;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue