summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-11-22 14:23:00 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-11-22 14:23:00 (GMT)
commite670b2d5c39ce6ac72890e52e9d505f90c33ccba (patch)
tree32fa3f3e0ef8a4f23cd5a32f0548480b6c077255
parent3a5d79fbc87a70e733edc2de1bed35f6e14000a4 (diff)
downloadcpython-e670b2d5c39ce6ac72890e52e9d505f90c33ccba.zip
cpython-e670b2d5c39ce6ac72890e52e9d505f90c33ccba.tar.gz
cpython-e670b2d5c39ce6ac72890e52e9d505f90c33ccba.tar.bz2
Issue #28727: Fix typo in pattern_richcompare()
Typo catched by Serhiy Storchaka, thanks!
-rw-r--r--Modules/_sre.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c
index c1e9fa6..1b77416 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -2688,7 +2688,7 @@ pattern_richcompare(PyObject *lefto, PyObject *righto, int op)
cmp = (left->flags == right->flags
&& left->isbytes == right->isbytes
- && left->codesize && right->codesize);
+ && left->codesize == right->codesize);
if (cmp) {
/* Compare the code and the pattern because the same pattern can
produce different codes depending on the locale used to compile the