Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5a6deb

Browse files
committed
Merge with 3.2 #6528 None, True, False are keywords in 3.x. Patch by R. Serwy.
2 parents f61ee5a + dc224f8 commit b5a6deb

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/idlelib/ColorDelegator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ def any(name, alternates):
1515
def make_pat():
1616
kw = r"\b" + any("KEYWORD", keyword.kwlist) + r"\b"
1717
builtinlist = [str(name) for name in dir(builtins)
18-
if not name.startswith('_')]
18+
if not name.startswith('_') and \
19+
name not in keyword.kwlist]
1920
# self.file = open("file") :
2021
# 1st 'file' colorized normal, 2nd as builtin, 3rd as string
2122
builtin = r"([^.'\"\\#]\b|^)" + any("BUILTIN", builtinlist) + r"\b"

Lib/idlelib/configDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def CreatePageHighlight(self):
199199
("'string'",'string'),('\n var1 = ','normal'),("'selected'",'hilite'),
200200
('\n var2 = ','normal'),("'found'",'hit'),
201201
('\n var3 = ','normal'),('list', 'builtin'), ('(','normal'),
202-
('None', 'builtin'),(')\n\n','normal'),
202+
('None', 'keyword'),(')\n\n','normal'),
203203
(' error ','error'),(' ','normal'),('cursor |','cursor'),
204204
('\n ','normal'),('shell','console'),(' ','normal'),('stdout','stdout'),
205205
(' ','normal'),('stderr','stderr'),('\n','normal'))

0 commit comments

Comments
 (0)