mirror of
https://github.com/python/cpython.git
synced 2025-09-13 20:27:05 +00:00
Added bytes and b'' as aliases for str and ''
This commit is contained in:
parent
a9e073d100
commit
288e89acfc
6 changed files with 43 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue