mirror of
https://github.com/python/cpython.git
synced 2025-09-04 16:01:10 +00:00
Disallow u"..." + b"..." and b"..." + u"...".
This commit is contained in:
parent
ad7d8d10b7
commit
84d79ddce2
2 changed files with 4 additions and 1 deletions
|
@ -5535,6 +5535,9 @@ PyObject *PyUnicode_Concat(PyObject *left,
|
|||
{
|
||||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue