From: Guido van Rossum Date: Wed, 2 Apr 1997 05:23:46 +0000 (+0000) Subject: Allow leading underscore in keywords. X-Git-Tag: v1.5a1~245 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6dacd90a83d9a84fd0a30fc7cb53d4c1c4ca17c4;p=python Allow leading underscore in keywords. --- diff --git a/Parser/grammar.c b/Parser/grammar.c index 5eebd3192e..608f6bdff4 100644 --- a/Parser/grammar.c +++ b/Parser/grammar.c @@ -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);