[issue6528] builtins colored as keyword at beginning of line

Terry J. Reedy report at bugs.python.org
Mon Jan 16 09:25:37 CET 2012


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I just realized that there is 'another' reason not to reuse builtin names (other than those usually given): they will be colorized as builtins even if they have no relation to the builtin. Make_pat uses the function any() defined just above (before the builtin, I am sure), so 'any' is colored as if it were the builtin. Within ColorDelegator.py, it is only used within make_pat, so I considered renaming it to anyp or any_pat, but it might be used by some other module that imports ColorDelegator. Another issue.

"name not in keyword.kwlist" could be "name not in {None, True, False}", but those happen to be the first three items in the kwlist, so the time difference would be nil.

Looks good. Tested on 3.2.2 Win7. Applied.

----------
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6528>
_______________________________________


More information about the Python-bugs-list mailing list