]> granicus.if.org Git - python/commitdiff
Allow leading underscore in keywords.
authorGuido van Rossum <guido@python.org>
Wed, 2 Apr 1997 05:23:46 +0000 (05:23 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 2 Apr 1997 05:23:46 +0000 (05:23 +0000)
Parser/grammar.c

index 5eebd3192e06dd2bf632644506821409a570f061..608f6bdff480b1630a1016f764d707f43c437130 100644 (file)
@@ -216,7 +216,7 @@ translabel(g, lb)
        }
        
        if (lb->lb_type == STRING) {
-               if (isalpha(lb->lb_str[1])) {
+               if (isalpha(lb->lb_str[1]) || lb->lb_str[1] == '_') {
                        char *p;
                        if (debugging)
                                printf("Label %s is a keyword\n", lb->lb_str);