From: Guido van Rossum Date: Thu, 27 Apr 2000 20:14:13 +0000 (+0000) Subject: Marc-Andre Lemburg: X-Git-Tag: v2.0b1~1919 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ec5b776998481c4b8e2ebfe2bbf0b76d5fa95a6b;p=thirdparty%2FPython%2Fcpython.git Marc-Andre Lemburg: Doc strings can now be given as Unicode strings. --- diff --git a/Objects/funcobject.c b/Objects/funcobject.c index c9dd1398a2ba..562935c6a971 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