diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2012-01-16 08:20:27 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2012-01-16 08:20:27 (GMT) |
commit | dc224f82c058b5cea38c8056fc18ea2aa6005a86 (patch) | |
tree | a40e680f9eeff5e5f02b3e81aae86f39f9b34d77 /Lib/idlelib | |
parent | 01b34afb3a9087444aabc7472e4acfbb3cef62df (diff) | |
download | cpython-dc224f82c058b5cea38c8056fc18ea2aa6005a86.zip cpython-dc224f82c058b5cea38c8056fc18ea2aa6005a86.tar.gz cpython-dc224f82c058b5cea38c8056fc18ea2aa6005a86.tar.bz2 |
#6528 None, True, False are keywords in 3.x. Patch by Roger Serwy.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/ColorDelegator.py | 3 | ||||
-rw-r--r-- | Lib/idlelib/configDialog.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Lib/idlelib/ColorDelegator.py b/Lib/idlelib/ColorDelegator.py index 29b4640..e188192 100644 --- a/Lib/idlelib/ColorDelegator.py +++ b/Lib/idlelib/ColorDelegator.py @@ -15,7 +15,8 @@ def any(name, alternates): def make_pat(): kw = r"\b" + any("KEYWORD", keyword.kwlist) + r"\b" builtinlist = [str(name) for name in dir(builtins) - if not name.startswith('_')] + if not name.startswith('_') and \ + name not in keyword.kwlist] # self.file = open("file") : # 1st 'file' colorized normal, 2nd as builtin, 3rd as string builtin = r"([^.'\"\\#]\b|^)" + any("BUILTIN", builtinlist) + r"\b" diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py index 6482119..d09fb5e 100644 --- a/Lib/idlelib/configDialog.py +++ b/Lib/idlelib/configDialog.py @@ -199,7 +199,7 @@ class ConfigDialog(Toplevel): ("'string'",'string'),('\n var1 = ','normal'),("'selected'",'hilite'), ('\n var2 = ','normal'),("'found'",'hit'), ('\n var3 = ','normal'),('list', 'builtin'), ('(','normal'), - ('None', 'builtin'),(')\n\n','normal'), + ('None', 'keyword'),(')\n\n','normal'), (' error ','error'),(' ','normal'),('cursor |','cursor'), ('\n ','normal'),('shell','console'),(' ','normal'),('stdout','stdout'), (' ','normal'),('stderr','stderr'),('\n','normal')) |