]> granicus.if.org Git - python/commitdiff
cmp_type(): The grammar stopped allowing '=' as a comparison operator
authorTim Peters <tim.peters@gmail.com>
Mon, 12 May 2003 19:16:52 +0000 (19:16 +0000)
committerTim Peters <tim.peters@gmail.com>
Mon, 12 May 2003 19:16:52 +0000 (19:16 +0000)
about a decade ago.  Put the code still allowing for it in cmp_type()
out of its lonely misery.

Python/compile.c

index 805c519cf937c68414dc003f1153b010c43ad394..a98b905fd6e8450c99e560f3b221c8bba572bfd8 100644 (file)
@@ -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 != */