From: Guido van Rossum Date: Fri, 25 Apr 1997 17:32:00 +0000 (+0000) Subject: Now that the string-sig has settled on r"obin" strings, restrict the X-Git-Tag: v1.5a1~135 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5026cb4dc6477c81c465c8d0f3a1e6c5344d20c5;p=python Now that the string-sig has settled on r"obin" strings, restrict the notation to 'r' and 'R'. --- diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 3bf0fee0c7..9f268402d5 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -541,9 +541,13 @@ tok_get(tok, p_start, p_end) /* Identifier (most frequent token!) */ if (isalpha(c) || c == '_') { - c = tok_nextc(tok); - if (c == '"' || c == '\'') - goto letter_quote; + switch (c) { + case 'r': + case 'R': + c = tok_nextc(tok); + if (c == '"' || c == '\'') + goto letter_quote; + } while (isalnum(c) || c == '_') { c = tok_nextc(tok); }