From 6c00b1141fdfa7d168a9b82e6ab493c77f7c1621 Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Wed, 28 Nov 2007 05:12:37 +0000 Subject: use 'in' keyword to test dictionary membership --- numpy/f2py/lib/parser/parsefortran.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/f2py/lib/parser/parsefortran.py') diff --git a/numpy/f2py/lib/parser/parsefortran.py b/numpy/f2py/lib/parser/parsefortran.py index 08716e7c8..2dacd9e9f 100644 --- a/numpy/f2py/lib/parser/parsefortran.py +++ b/numpy/f2py/lib/parser/parsefortran.py @@ -31,7 +31,7 @@ class FortranParser: Use .parse() method for parsing, parsing result is saved in .block attribute. """ self.reader = reader - if self.cache.has_key(reader.id): + if reader.id in self.cache: parser = self.cache[reader.id] self.block = parser.block self.is_analyzed = parser.is_analyzed -- cgit v1.2.1