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``.