commit | 84d79ddce2176ae54825da32e096d6332a8d5138 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Fri Apr 13 02:23:57 2007 +0000 |
committer | Guido van Rossum <guido@python.org> | Fri Apr 13 02:23:57 2007 +0000 |
tree | 17236790cda0f1ba7d0eda07a8112f9d717c9418 | |
parent | ad7d8d10b70b62b25fc8ebd1a6bfef0c008a232a [diff] [blame] |
Disallow u"..." + b"..." and b"..." + u"...".
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 4fe4d10..ce28692 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c
@@ -5535,6 +5535,9 @@ { PyUnicodeObject *u = NULL, *v = NULL, *w; + if (PyBytes_Check(left) || PyBytes_Check(right)) + return PyBytes_Concat(left, right); + /* Coerce the two arguments */ u = (PyUnicodeObject *)PyUnicode_FromObject(left); if (u == NULL)