else
{
PyErr_Format(PyExc_TypeError,
- "expected str object, "
+ "expected string, "
"%.200s found", obj->ob_type->tp_name);
return -1;
}
if (PyBytes_Check(bb))
return PyBytes_Concat((PyObject *)a, bb);
PyErr_Format(PyExc_TypeError,
- "cannot concatenate 'str' and '%.200s' objects",
+ "cannot concatenate 'str8' and '%.200s' objects",
bb->ob_type->tp_name);
return NULL;
}
return res;
}
PyErr_Format(PyExc_TypeError,
- "%s arg must be None or str",
+ "%s arg must be None or string",
STRIPNAME(striptype));
return NULL;
}
PyDoc_STRVAR(strip__doc__,
-"S.strip([chars]) -> str\n\
+"S.strip([chars]) -> string\n\
\n\
Return a copy of the string S with leading and trailing\n\
whitespace removed.\n\
PyDoc_STRVAR(lstrip__doc__,
-"S.lstrip([chars]) -> str\n\
+"S.lstrip([chars]) -> string\n\
\n\
Return a copy of the string S with leading whitespace removed.\n\
If chars is given and not None, remove characters in chars instead.\n\
PyDoc_STRVAR(rstrip__doc__,
-"S.rstrip([chars]) -> str\n\
+"S.rstrip([chars]) -> string\n\
\n\
Return a copy of the string S with trailing whitespace removed.\n\
If chars is given and not None, remove characters in chars instead.\n\
if (type != &PyString_Type)
return str_subtype_new(type, args, kwds);
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:str", kwlist, &x))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:str8", kwlist, &x))
return NULL;
if (x == NULL)
return PyString_FromString("");
}
PyDoc_STRVAR(basestring_doc,
-"Type basestring cannot be instantiated; it is the base for str and unicode.");
+"Type basestring cannot be instantiated; it is the base for str8 and str.");
static PyNumberMethods string_as_number = {
0, /*nb_add*/
goto error;
if (!PyString_Check(temp)) {
PyErr_SetString(PyExc_TypeError,
- "%s argument has non-string str()");
+ "%s argument has non-string str()/repr()");
Py_DECREF(temp);
goto error;
}