[Python-Dev] Bug in stringobject? (original) (raw)
Georg Brandl g.brandl at gmx.net
Sat Jul 1 11:00:13 CEST 2006
- Previous message: [Python-Dev] sys.settrace() in Python 2.3 vs. 2.4
- Next message: [Python-Dev] Bug in stringobject?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Georg Brandl wrote:
In stringreplace, there is
if (PyStringCheck(from)) { /* Can this be made a '!check' after the Unicode check? */ } #ifdef PyUSINGUNICODE if (PyUnicodeCheck(from)) return PyUnicodeReplace((PyObject *)self, from, to, count); #endif else if (PyObjectAsCharBuffer(from, &tmps, &tmplen)) 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
- Previous message: [Python-Dev] sys.settrace() in Python 2.3 vs. 2.4
- Next message: [Python-Dev] Bug in stringobject?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]