From 3219bbf6a159110d293dcfef2d5889ab020f4c5b Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 25 Apr 2018 22:57:34 -0700 Subject: [PATCH] fix running the curses.has_key module (closes bpo-33359) (GH-6608) This was broken by poor automated translation back in 6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc. --- Lib/curses/has_key.py | 2 +- .../next/Library/2018-04-25-22-41-04.bpo-33359.Nr4CzK.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2018-04-25-22-41-04.bpo-33359.Nr4CzK.rst diff --git a/Lib/curses/has_key.py b/Lib/curses/has_key.py index 1dd5a3bd4a4..60b7be99426 100644 --- a/Lib/curses/has_key.py +++ b/Lib/curses/has_key.py @@ -182,7 +182,7 @@ if __name__ == '__main__': L = [] _curses.initscr() for key in _capability_names.keys(): - system = key in _curses + system = _curses.has_key(key) python = has_key(key) if system != python: L.append( 'Mismatch for key %s, system=%i, Python=%i' diff --git a/Misc/NEWS.d/next/Library/2018-04-25-22-41-04.bpo-33359.Nr4CzK.rst b/Misc/NEWS.d/next/Library/2018-04-25-22-41-04.bpo-33359.Nr4CzK.rst new file mode 100644 index 00000000000..5a90f2f09ce --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-04-25-22-41-04.bpo-33359.Nr4CzK.rst @@ -0,0 +1 @@ +Fix running ``python -m curses.has_key``.