]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix running the curses.has_key module (closes bpo-33359) (GH-6608)
authorBenjamin Peterson <benjamin@python.org>
Thu, 26 Apr 2018 05:57:34 +0000 (22:57 -0700)
committerGitHub <noreply@github.com>
Thu, 26 Apr 2018 05:57:34 +0000 (22:57 -0700)
This was broken by poor automated translation back in 6e3dbbdf39f3b4eb6f18c0165e446df17218b7dc.

Lib/curses/has_key.py
Misc/NEWS.d/next/Library/2018-04-25-22-41-04.bpo-33359.Nr4CzK.rst [new file with mode: 0644]

index 1dd5a3bd4a4b2a56cbfe9ad4a046299c4260a180..60b7be9942677c26c4cace65a1bee0b1d1c4f0b2 100644 (file)
@@ -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 (file)
index 0000000..5a90f2f
--- /dev/null
@@ -0,0 +1 @@
+Fix running ``python -m curses.has_key``.