[Python-checkins] [3.6] bpo-29706: IDLE now colors async and await as keywords in 3.6. (#6879)

Terry Jan Reedy webhook-mailer at python.org
Tue May 15 20:10:49 EDT 2018


https://github.com/python/cpython/commit/1b0d65fa102fae087254009f6d9903b1d4257d78
commit: 1b0d65fa102fae087254009f6d9903b1d4257d78
branch: 3.6
author: Terry Jan Reedy <tjreedy at udel.edu>
committer: GitHub <noreply at github.com>
date: 2018-05-15T20:10:46-04:00
summary:

[3.6] bpo-29706: IDLE now colors async and await as keywords in 3.6. (#6879)

They become full keywords in 3.7.

files:
A Misc/NEWS.d/next/IDLE/2018-05-15-17-01-10.bpo-29706.id4H5i.rst
M Lib/idlelib/colorizer.py

diff --git a/Lib/idlelib/colorizer.py b/Lib/idlelib/colorizer.py
index 1f31ce22d7e5..f450ec2fd4ef 100644
--- a/Lib/idlelib/colorizer.py
+++ b/Lib/idlelib/colorizer.py
@@ -13,7 +13,7 @@ def any(name, alternates):
     return "(?P<%s>" % name + "|".join(alternates) + ")"
 
 def make_pat():
-    kw = r"\b" + any("KEYWORD", keyword.kwlist) + r"\b"
+    kw = r"\b" + any("KEYWORD", keyword.kwlist + ['async', 'await']) + r"\b"
     builtinlist = [str(name) for name in dir(builtins)
                                         if not name.startswith('_') and \
                                         name not in keyword.kwlist]
diff --git a/Misc/NEWS.d/next/IDLE/2018-05-15-17-01-10.bpo-29706.id4H5i.rst b/Misc/NEWS.d/next/IDLE/2018-05-15-17-01-10.bpo-29706.id4H5i.rst
new file mode 100644
index 000000000000..b25a878b1567
--- /dev/null
+++ b/Misc/NEWS.d/next/IDLE/2018-05-15-17-01-10.bpo-29706.id4H5i.rst
@@ -0,0 +1,2 @@
+IDLE now colors async and await as keywords in 3.6. They become full
+keywords in 3.7.



More information about the Python-checkins mailing list