summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-05-12 19:16:52 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-05-12 19:16:52 (GMT)
commit12d55a7caaf58e7219f7c2bfa796ab19246640dd (patch)
tree63de4f219ed08882d84450d5599dbb30bc77fec1
parentd2eadc6946f676dd74707e1da93b61ecefc324c1 (diff)
downloadcpython-12d55a7caaf58e7219f7c2bfa796ab19246640dd.zip
cpython-12d55a7caaf58e7219f7c2bfa796ab19246640dd.tar.gz
cpython-12d55a7caaf58e7219f7c2bfa796ab19246640dd.tar.bz2
cmp_type(): The grammar stopped allowing '=' as a comparison operator
about a decade ago. Put the code still allowing for it in cmp_type() out of its lonely misery.
-rw-r--r--Python/compile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 805c519..a98b905 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2368,15 +2368,14 @@ static enum cmp_op
cmp_type(node *n)
{
REQ(n, comp_op);
- /* comp_op: '<' | '>' | '=' | '>=' | '<=' | '<>' | '!=' | '=='
+ /* comp_op: '<' | '>' | '>=' | '<=' | '<>' | '!=' | '=='
| 'in' | 'not' 'in' | 'is' | 'is' not' */
if (NCH(n) == 1) {
n = CHILD(n, 0);
switch (TYPE(n)) {
case LESS: return PyCmp_LT;
case GREATER: return PyCmp_GT;
- case EQEQUAL: /* == */
- case EQUAL: return PyCmp_EQ;
+ case EQEQUAL: return PyCmp_EQ;
case LESSEQUAL: return PyCmp_LE;
case GREATEREQUAL: return PyCmp_GE;
case NOTEQUAL: return PyCmp_NE; /* <> or != */