From ec5b776998481c4b8e2ebfe2bbf0b76d5fa95a6b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 27 Apr 2000 20:14:13 +0000 Subject: [PATCH] Marc-Andre Lemburg: Doc strings can now be given as Unicode strings. --- Objects/funcobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/funcobject.c b/Objects/funcobject.c index c9dd1398a2..562935c6a9 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -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 -- 2.50.1