mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
Marc-Andre Lemburg:
Doc strings can now be given as Unicode strings.
This commit is contained in:
parent
3c1bb8043f
commit
ec5b776998
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue