Change the %s format specifier for str objects so that it returns a

unicode instance if the argument is not an instance of basestring and
calling __str__ on the argument returns a unicode instance.
This commit is contained in:
Neil Schemenauer 2005-08-12 17:34:58 +00:00
parent ba7d95e215
commit cf52c07843
5 changed files with 42 additions and 17 deletions

View file

@ -371,6 +371,7 @@ PyAPI_FUNC(PyObject *) _PyType_Lookup(PyTypeObject *, PyObject *);
PyAPI_FUNC(int) PyObject_Print(PyObject *, FILE *, int);
PyAPI_FUNC(void) _PyObject_Dump(PyObject *);
PyAPI_FUNC(PyObject *) PyObject_Repr(PyObject *);
PyAPI_FUNC(PyObject *) _PyObject_Str(PyObject *);
PyAPI_FUNC(PyObject *) PyObject_Str(PyObject *);
#ifdef Py_USING_UNICODE
PyAPI_FUNC(PyObject *) PyObject_Unicode(PyObject *);