mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
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:
parent
ba7d95e215
commit
cf52c07843
5 changed files with 42 additions and 17 deletions
|
|
@ -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 *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue