This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author georg.brandl
Recipients
Date 2006-07-01.09:41:30
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
stringobject.c:

In string_replace, there is

	if (PyString_Check(from)) {
	  /* Can this be made a '!check' after the Unicode
check? */
	}
#ifdef Py_USING_UNICODE
	if (PyUnicode_Check(from))
		return PyUnicode_Replace((PyObject *)self,
					 from, to, count);
#endif
	else if (PyObject_AsCharBuffer(from, &tmp_s, &tmp_len))
		return NULL;

[the same check with "to"]

	return (PyObject *)replace((PyStringObject *) self,
				   (PyStringObject *) from,
				   (PyStringObject *) to, count);

This is not correct if from or to isn't a string
object, but a char buffer compatible object.
History
Date User Action Args
2007-08-23 14:40:58adminlinkissue1515471 messages
2007-08-23 14:40:58admincreate