diff options
Diffstat (limited to 'Lib/tokenize.py')
-rw-r--r-- | Lib/tokenize.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/tokenize.py b/Lib/tokenize.py index 3014b19..9f46612 100644 --- a/Lib/tokenize.py +++ b/Lib/tokenize.py @@ -26,7 +26,7 @@ tok_name[NL] = 'NL' # Imagnumber is new. Expfloat is corrected to reject '0e4'. # Note: to quote a backslash in a regex, it must be doubled in a r'aw' string. -def group(*choices): return '(' + string.join(choices, '|') + ')' +def group(*choices): return '(' + '|'.join(choices) + ')' def any(*choices): return apply(group, choices) + '*' def maybe(*choices): return apply(group, choices) + '?' |