From: Raymond Hettinger Date: Sun, 1 Jul 2012 07:37:05 +0000 (-0700) Subject: Limit which operators get colorized X-Git-Tag: v3.3.0b2~342 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e4870b511796293b5e6cb82809ea035c54079e90;p=python Limit which operators get colorized --- diff --git a/Tools/scripts/pycolorize.py b/Tools/scripts/pycolorize.py index 6d43313c0e..576d473f58 100755 --- a/Tools/scripts/pycolorize.py +++ b/Tools/scripts/pycolorize.py @@ -28,7 +28,7 @@ def colorize(source): kind, prev_kind = '', kind if tok_type == tokenize.COMMENT: kind = 'comment' - elif tok_type == tokenize.OP: + elif tok_type == tokenize.OP and tok_str[:1] not in '{}[](),.:;': kind = 'operator' elif tok_type == tokenize.STRING: kind = 'string'