summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2000-08-24 21:44:52 (GMT)
committerThomas Wouters <thomas@python.org>2000-08-24 21:44:52 (GMT)
commite1519a1b4d8e24ab6a98083c6ec8bf4ec7594111 (patch)
tree750fa66d0c0d6e1e7285f6c3b0944524200b7478 /Lib
parent34052622c92d852ad1659fb7583d32fd305583e9 (diff)
downloadcpython-e1519a1b4d8e24ab6a98083c6ec8bf4ec7594111.zip
cpython-e1519a1b4d8e24ab6a98083c6ec8bf4ec7594111.tar.gz
cpython-e1519a1b4d8e24ab6a98083c6ec8bf4ec7594111.tar.bz2
Update for augmented assignment, tested & approved by Guido.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/tokenize.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/tokenize.py b/Lib/tokenize.py
index a225211..30bb557 100644
--- a/Lib/tokenize.py
+++ b/Lib/tokenize.py
@@ -54,8 +54,11 @@ Triple = group("[rR]?'''", '[rR]?"""')
String = group("[rR]?'" + any(r"[^\n'\\]", r'\\.') + "'",
'[rR]?"' + any(r'[^\n"\\]', r'\\.') + '"')
-Operator = group('\+', '\-', '\*\*', '\*', '\^', '~', '/', '%', '&', '\|',
- '<<', '>>', '==', '<=', '<>', '!=', '>=', '=', '<', '>')
+Operator = group('\+=', '\-=', '\*=', '%=', '/=', '\*\*=', '&=', '\|=',
+ '\^=', '>>=', '<<=', '\+', '\-', '\*\*', '\*', '\^', '~',
+ '/', '%', '&', '\|', '<<', '>>', '==', '<=', '<>', '!=',
+ '>=', '=', '<', '>')
+
Bracket = '[][(){}]'
Special = group(r'\r?\n', r'[:;.,`]')
Funny = group(Operator, Bracket, Special)