]> granicus.if.org Git - python/commitdiff
Marc-Andre Lemburg:
authorGuido van Rossum <guido@python.org>
Thu, 27 Apr 2000 20:14:13 +0000 (20:14 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 27 Apr 2000 20:14:13 +0000 (20:14 +0000)
Doc strings can now be given as Unicode strings.

Objects/funcobject.c

index c9dd1398a2bae88fe4c93e913baf1a6197143461..562935c6a97104badb75ac73f1c05ff754d85630 100644 (file)
@@ -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