Skip to content

Commit ec5b776

Browse files
committed
Marc-Andre Lemburg:
Doc strings can now be given as Unicode strings.
1 parent 3c1bb80 commit ec5b776

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/funcobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ PyFunction_New(code, globals)
5555
consts = ((PyCodeObject *)code)->co_consts;
5656
if (PyTuple_Size(consts) >= 1) {
5757
doc = PyTuple_GetItem(consts, 0);
58-
if (!PyString_Check(doc))
58+
if (!PyString_Check(doc) && !PyUnicode_Check(doc))
5959
doc = Py_None;
6060
}
6161
else

0 commit comments

Comments
 (0)