mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
STINNER Victor (haypo)'s patch for bug 3988, Byte warning mode and b'' != ''
Also, his patch to runtests.sh to pass the -bb option (issue 4125).
This commit is contained in:
parent
e94a37f3a1
commit
9e9dcd6d42
3 changed files with 14 additions and 2 deletions
|
|
@ -818,7 +818,7 @@ string_richcompare(PyBytesObject *a, PyBytesObject *b, int op)
|
|||
|
||||
/* Make sure both arguments are strings. */
|
||||
if (!(PyBytes_Check(a) && PyBytes_Check(b))) {
|
||||
if (Py_BytesWarningFlag && (op == Py_EQ) &&
|
||||
if (Py_BytesWarningFlag && (op == Py_EQ || op == Py_NE) &&
|
||||
(PyObject_IsInstance((PyObject*)a,
|
||||
(PyObject*)&PyUnicode_Type) ||
|
||||
PyObject_IsInstance((PyObject*)b,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue