diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2007-11-22 02:55:35 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2007-11-22 02:55:35 (GMT) |
commit | 4d279c1f80428c094cd5e5fbd1491f16fda177bf (patch) | |
tree | 6c8b77ec2acc3533d35cd8894d6e1be3170863ab /Objects | |
parent | 39599dca9db7431510f1d68609db5ea0b60af2cb (diff) | |
download | cpython-4d279c1f80428c094cd5e5fbd1491f16fda177bf.zip cpython-4d279c1f80428c094cd5e5fbd1491f16fda177bf.tar.gz cpython-4d279c1f80428c094cd5e5fbd1491f16fda177bf.tar.bz2 |
Typo in bytes.replace(): the buffer interface was always used.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/stringobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index d341436..d135991 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -2594,7 +2594,7 @@ string_replace(PyStringObject *self, PyObject *args) from_s = PyString_AS_STRING(from); from_len = PyString_GET_SIZE(from); } - if (PyUnicode_Check(from)) + else if (PyUnicode_Check(from)) return PyUnicode_Replace((PyObject *)self, from, to, count); else if (PyObject_AsCharBuffer(from, &from_s, &from_len)) |