mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Renamed PyString to PyBytes
This commit is contained in:
parent
9c4756ea26
commit
72b710a596
78 changed files with 983 additions and 983 deletions
|
@ -778,7 +778,7 @@ FORMAT_STRING(PyObject* value, PyObject* args)
|
|||
/* This is to allow things like u''.format('') */
|
||||
if (!PyArg_ParseTuple(args, "O:__format__", &format_spec))
|
||||
goto done;
|
||||
if (!(PyString_Check(format_spec) || PyUnicode_Check(format_spec))) {
|
||||
if (!(PyBytes_Check(format_spec) || PyUnicode_Check(format_spec))) {
|
||||
PyErr_Format(PyExc_TypeError, "__format__ arg must be str "
|
||||
"or unicode, not %s", Py_TYPE(format_spec)->tp_name);
|
||||
goto done;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue