[Python-checkins] cpython: Limit which operators get colorized

raymond.hettinger python-checkins at python.org
Sun Jul 1 09:37:14 CEST 2012


http://hg.python.org/cpython/rev/fae140c00954
changeset:   77904:fae140c00954
user:        Raymond Hettinger <python at rcn.com>
date:        Sun Jul 01 00:37:05 2012 -0700
summary:
  Limit which operators get colorized

files:
  Tools/scripts/pycolorize.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Tools/scripts/pycolorize.py b/Tools/scripts/pycolorize.py
--- a/Tools/scripts/pycolorize.py
+++ b/Tools/scripts/pycolorize.py
@@ -28,7 +28,7 @@
         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'

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list