diff tools/pygettext.py @ 5381:0942fe89e82e

Python 3 preparation: change "x.has_key(y)" to "y in x". (Also likewise "not in" where appropriate.) Tool-generated patch.
author Joseph Myers <jsm@polyomino.org.uk>
date Tue, 24 Jul 2018 22:08:17 +0000
parents 64b05e24dbd8
children a7bf8c4e502f
line wrap: on
line diff
--- a/tools/pygettext.py	Tue Jul 24 21:43:32 2018 +0000
+++ b/tools/pygettext.py	Tue Jul 24 22:08:17 2018 +0000
@@ -266,7 +266,7 @@
 def _visit_pyfiles(list, dirname, names):
     """Helper for getFilesForName()."""
     # get extension for python source files
-    if not globals().has_key('_py_ext'):
+    if '_py_ext' not in globals():
         global _py_ext
         _py_ext = [triple[0] for triple in imp.get_suffixes()
                    if triple[2] == imp.PY_SOURCE][0]

Roundup Issue Tracker: http://roundup-tracker.org/