Marc-Andre Lemburg:

Doc strings can now be given as Unicode strings.
This commit is contained in:
Guido van Rossum 2000-04-27 20:14:13 +00:00
parent 3c1bb8043f
commit ec5b776998
1 changed files with 1 additions and 1 deletions

View File

@ -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