summaryrefslogtreecommitdiffstats
path: root/Parser/grammar.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-04-02 05:23:46 (GMT)
committerGuido van Rossum <guido@python.org>1997-04-02 05:23:46 (GMT)
commit6dacd90a83d9a84fd0a30fc7cb53d4c1c4ca17c4 (patch)
treedb1ee5a8d5b6c952b49e880abb0057a0f687110c /Parser/grammar.c
parent6fa4466cec75ca540ebf00a79092415cc1e1485f (diff)
downloadcpython-6dacd90a83d9a84fd0a30fc7cb53d4c1c4ca17c4.zip
cpython-6dacd90a83d9a84fd0a30fc7cb53d4c1c4ca17c4.tar.gz
cpython-6dacd90a83d9a84fd0a30fc7cb53d4c1c4ca17c4.tar.bz2
Allow leading underscore in keywords.
Diffstat (limited to 'Parser/grammar.c')
-rw-r--r--Parser/grammar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/grammar.c b/Parser/grammar.c
index 5eebd31..608f6bd 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);