From: Benjamin Peterson Date: Thu, 26 Apr 2018 05:57:34 +0000 (-0700) Subject: fix running the curses.has_key module (closes bpo-33359) (GH-6608) X-Git-Tag: v2.7.16rc1~320 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3219bbf6a159110d293dcfef2d5889ab020f4c5b;p=thirdparty%2FPython%2Fcpython.git fix running the curses.has_key module (closes bpo-33359) (GH-6608) This was broken by poor automated translation back in 6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc. --- diff --git a/Lib/curses/has_key.py b/Lib/curses/has_key.py index 1dd5a3bd4a4b..60b7be994267 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 000000000000..5a90f2f09cee --- /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``.