From: Terry Jan Reedy Date: Wed, 16 May 2018 00:10:46 +0000 (-0400) Subject: [3.6] bpo-29706: IDLE now colors async and await as keywords in 3.6. (#6879) X-Git-Tag: v3.6.6rc1~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b0d65fa102fae087254009f6d9903b1d4257d78;p=thirdparty%2FPython%2Fcpython.git [3.6] bpo-29706: IDLE now colors async and await as keywords in 3.6. (#6879) They become full keywords in 3.7. --- 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.