[issue44010] IDLE: highlight soft keywords

Terry J. Reedy report at bugs.python.org
Mon May 3 06:42:41 EDT 2021


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

My plan for the next day or two is to submit followup issue for Shell and formally code what I wrote.

The only way to handle soft keywords correctly is with a custom re.  I don't expect them to become common.  They are different from builtins because they only have special meaning in (so far) definable situations.  When  builtin is 'redefined, it may or may not be appropriate to keep the highlight.  Examples when it is:

oldprint = print
def print(*args, **kwds:
    log the print
    oldprint(*args, **kwds)

def intsum(nums, int=int):  # Localize int for speed.
    <code that calls int multiple times>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44010>
_______________________________________


More information about the Python-bugs-list mailing list