Georg Brandl wrote: > 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); > > > Can this be correct if from or to isn't a string object, but a > char buffer compatible object?
May I note that this is still unresolved? I can submit a bug report and add it to PEP 356, too... Georg _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com