Skip to content

Commit 1b0d65f

Browse files
authored
[3.6] bpo-29706: IDLE now colors async and await as keywords in 3.6. (#6879)
They become full keywords in 3.7.
1 parent 7c59a33 commit 1b0d65f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Lib/idlelib/colorizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def any(name, alternates):
1313
return "(?P<%s>" % name + "|".join(alternates) + ")"
1414

1515
def make_pat():
16-
kw = r"\b" + any("KEYWORD", keyword.kwlist) + r"\b"
16+
kw = r"\b" + any("KEYWORD", keyword.kwlist + ['async', 'await']) + r"\b"
1717
builtinlist = [str(name) for name in dir(builtins)
1818
if not name.startswith('_') and \
1919
name not in keyword.kwlist]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
IDLE now colors async and await as keywords in 3.6. They become full
2+
keywords in 3.7.

0 commit comments

Comments
 (0)