Mercurial > cpython-lru_cache-weakref
diff Modules/_elementtree.c @ 81484:849eb27baf1c 3.2
Issue #16922: fixed findtext() to return empty Unicode string instead of empty bytes object when there's no text.
Patch by Serhiy Storchaka.
| author | Eli Bendersky <eliben@gmail.com> |
|---|---|
| date | Sun, 13 Jan 2013 05:22:05 -0800 |
| parents | c8534d55c5e6 |
| children | d50e259f5482 |
line wrap: on
line diff
--- a/Modules/_elementtree.c Sun Jan 13 13:56:52 2013 +0100 +++ b/Modules/_elementtree.c Sun Jan 13 05:22:05 2013 -0800 @@ -840,7 +840,7 @@ PyObject* text = element_get_text(item); if (text == Py_None) - return PyBytes_FromString(""); + return PyUnicode_FromString(""); Py_XINCREF(text); return text; }
