summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-18 18:24:07 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-18 18:24:07 (GMT)
commit288e89acfc29cf857a8c5d314ba2dd3398a2eae9 (patch)
treee4ca8e317d378207d274157a0dc138e2917cbc1b /Parser
parenta9e073d100c3869231ce7275ff7a810d8db74fc4 (diff)
downloadcpython-288e89acfc29cf857a8c5d314ba2dd3398a2eae9.zip
cpython-288e89acfc29cf857a8c5d314ba2dd3398a2eae9.tar.gz
cpython-288e89acfc29cf857a8c5d314ba2dd3398a2eae9.tar.bz2
Added bytes and b'' as aliases for str and ''
Diffstat (limited to 'Parser')
-rw-r--r--Parser/tokenizer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index ee353aa..0015dae 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -1263,6 +1263,14 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end)
if (isalpha(c) || c == '_') {
/* Process r"", u"" and ur"" */
switch (c) {
+ case 'b':
+ case 'B':
+ c = tok_nextc(tok);
+ if (c == 'r' || c == 'R')
+ c = tok_nextc(tok);
+ if (c == '"' || c == '\'')
+ goto letter_quote;
+ break;
case 'r':
case 'R':
c = tok_nextc(tok);