paul wrote: =20 > If we want to use a hard-coded lossless encoding, we should do so in > repr. Rather than having us fix a dozen modules with problems like = this, > we should fix repr once and for all. =20 how about allowing str and repr to actually return unicode strings? or in other words: PyObject *res; res =3D (*v->ob_type->tp_repr)(v); if (res =3D=3D NULL) return NULL; if (!PyString_Check(res) && !PyUnicode_Check(res)) { PyErr_Format(PyExc_TypeError, "__repr__ returned non-string (type %.200s)", res->ob_type->tp_name); Py_DECREF(res); return NULL; } return res; (strings are strings are strings, etc) </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4