diff Objects/unicodeobject.c @ 41451:e2d7a4c39360

Disallow u"..." + b"..." and b"..." + u"...".
author Guido van Rossum <guido@python.org>
date Fri, 13 Apr 2007 02:23:57 +0000
parents f2f0b41f270d
children 29ae667f3239
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Fri Apr 13 01:39:34 2007 +0000
+++ b/Objects/unicodeobject.c	Fri Apr 13 02:23:57 2007 +0000
@@ -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)